Answer
$$\int z(\ln z)^2dz=\frac{z^2}{4}\Big(2(\ln z)^2-2\ln z+1\Big)+C$$
Work Step by Step
$$A=\int z(\ln z)^2dz$$
Set $a=\ln z$, which means $z=e^a$
We then have $$da=\frac{dz}{z}$$ $$dz=zda=e^ada$$
Therefore, $$A=\int e^a\times a^2\times e^ada=\int a^2e^{2a}da$$
Set $u=a^2$ and $dv=e^{2a}da$
So $du=2ada$ and $v=\frac{e^{2a}}{2}$
Following the formula $\int udv=uv-\int vdu$, we have $$A=\frac{a^2e^{2a}}{2}-\int\frac{e^{2a}}{2}\times2ada$$ $$A=\frac{a^2e^{2a}}{2}-\int ae^{2a}da$$
Set $u=a$ and $dv=e^{2a}da$
So $du=da$ and $v=\frac{e^{2a}}{2}$
Following the formula $\int udv=uv-\int vdu$, we have $$A=\frac{a^2e^{2a}}{2}-\Big(\frac{ae^{2a}}{2}-\int\frac{e^{2a}}{2}da\Big)$$ $$A=\frac{a^2e^{2a}}{2}-\frac{ae^{2a}}{2}+\frac{1}{2}\int e^{2a}da$$ $$A=\frac{a^2e^{2a}-ae^{2a}}{2}+\frac{e^{2a}}{4}+C$$ $$A=\frac{e^{2a}}{4}(2a^2-2a+1)+C$$ $$A=\frac{e^{2\ln z}}{4}\Big(2(\ln z)^2-2\ln z+1\Big)+C$$
We have $e^{2\ln z}=(e^{\ln z})^2=z^2$
$$A=\frac{z^2}{4}\Big(2(\ln z)^2-2\ln z+1\Big)+C$$