Separate your variables:
\(\dfrac{\mathrm dy}{\mathrm dx}=\dfrac{2y}x\implies \dfrac{\mathrm dy}y=2\dfrac{\mathrm dx}x\)
Integrating both sides gives
\(\displaystyle\int\frac{\mathrm dy}y=2\int\frac{\mathrm dx}x\implies \ln|y|=2\ln|x|+C\implies y=e^{2\ln|x|+C}=Cx^2\)