Hi i was wondering if anyone could help me with integrating factors.

y'+1/x(y)=x is the question

Hence the intergrating factor is e^the integral of 1/x. this gives e^lnx +A. which leaves the integratig factor as x. Hence x(y'+1/x(y))=x^2

then xy'+y=x^2. However after this point i am not sure where to go. the example tells me to go to dy/dx(xy)=x^2. But i am not sure why to do that. If anybody could help it would be appreciated and if anybody has any more tips on integrating factors that would be nice! thanks