This differential equation can be solved by using the method of inspection.
Rearranging the terms of the D.E. , we get $xdy-ydx=(x^{2}y^{2})(ydx+xdy)$
$\Rightarrow$ $\frac{xdy-ydx}{xy}=xy(xdy+ydx)$
$\Rightarrow$ $d\left ( log\left ( \frac{y}{x} \right ) \right )=xyd(xy)$
$\Rightarrow$ $log(\frac{y}{x})=\frac{x^{2}y^{2}}{2}+c$
Rearranging the above equation, we get $x^{2}y^{2}=2(logy-logx)+C$
Option D is correct answer.