If i'm not mistaken, i solved this problem already, anyway...

we proceed using the separation of variables

xy' + 2y = 0

=> y' + (2/x)y = 0

=> y' = (-2/x)y

=> y'/y = -2/x

=> lny = -2ln(x) + C = ln(x)^-2 + C.............integrated both sides

since lny = lnAx^-2

=> y = Ax^-2 is the general solution, where A is a constant