Rewrite the equation:
\[
x^2 \frac{dy}{dx} = 2xy \implies \frac{dy}{dx} = \frac{2y}{x}.
\]
This is a separable differential equation. Separate variables:
\[
\frac{dy}{y} = \frac{2}{x} dx.
\]
Integrate both sides:
\[
\int \frac{1}{y} dy = \int \frac{2}{x} dx \implies \ln |y| = 2 \ln |x| + C,
\]
where \( C \) is the constant of integration.
Rewrite:
\[
\ln |y| = \ln |x|^2 + C \implies y = e^{C} x^{2} = K x^{2}, \quad K = e^{C}.
\]
% Final solution:
\[
\boxed{y = K x^{2}}.
\]