Hey!
The first part asks you to integrate
∫lnxdx by setting
u=lnx and
dv=1.
So, it is by no means, a big leap to integrate
∫(lnx)2dx by setting
u=(lnx)2 and
dv=1.
Essentially, what the question is demonstrating in the first part is that "set u = ugly logarithm" and "dv = something nice and simple" where you can see that v then becomes x and du becomes something * 1/x. This then cancels in the integral of v du part of your IBP.
So, when you get to (ii), you should be able to see that setting u = (ln x)^2 still gets you du = something * 1/x and dv becomes x so that integral of v du becomes something simple and cancels. Basically, try and
never have dv = a logarithm function. That's plain hell.