An alternative approach showing how to arrive at the right integrating factor. Split the terms in two groups as follows
$$2x^2dx+(y^2dx-xydy)=0$$
Now for $2x^2dx$ the integrating factor is trivial $1$ leading to solution $x^3=C$. Then $\mu_1=\phi(x^3)$ where $\phi$ is an arbitrary function will be the most general integrating factor for this part.
For the second part it is easy to see that $\frac{1}{xy^2}$ separates variables giving solution $\frac{x}{y}=C$. Therefore, the most general integrating factor will be $\mu_2=\frac{1}{xy^2}\psi\left(\frac{x}{y}\right)$.
Now we want to make $\mu_1\equiv\mu_2$. Set $\psi(t)=\frac{1}{t^2}$ to make $\mu_2$ independent of $x$. Hence, $\mu_2=\frac{1}{x^3}$. This implies $\phi(t)=\frac{1}{t}$. So $\mu_1\equiv\mu_2=\frac{1}{x^3}$
$$2\frac{dx}{x}+\left(\frac{y}{x}\right)^2d\left(\frac{x}{y}\right)=0$$
$$2\frac{dx}{x}+\frac{d\left(\frac{x}{y}\right)}{\left(\frac{x}{y}\right)^2}=0$$
$$d\left[\ln\left(x^2\right)\right]-d\left[\left(\frac{x}{y}\right)^{-1}\right]=0$$
$$d\left[\ln\left(x^2\right)-\left(\frac{y}{x}\right)\right]=0$$
$$x^2=Ce^{\frac{y}{x}}$$