Answer
$$ y=-(\frac{1}{2}x^2-1)^{-1} .$$
Work Step by Step
By separation of variables, we have
$$ y^{-2}dy= xdx $$
then by integration, we get
$$ - y^{-1}=\frac{1}{2}x^2+c .$$
Now, since $y(1)=2$, then $c=-1 $.
So the general solution is given by $$ y=-(\frac{1}{2}x^2-1)^{-1} .$$