Answer
\[y(x)=-x\left[1+\frac{1}{\ln (Cx)}\right]\]
Work Step by Step
\[x^2\frac{dy}{dx}=y^2+3xy+x^2\]
\[\frac{dy}{dx}=\frac{y^2}{x^2}+\frac{3y}{x}+1\;\;\;\ldots (1)\]
Substitute $\: y=Vx\;\;\;\ldots (2)$
Differentiate (2) with respect to $x$
\[\frac{dy}{dx}=V+x\frac{dV}{dx}\;\;\;\ldots (3)\]
From (1),(2) and (3)
\[V+x\frac{dV}{dx}=V^2+3V+1\]
\[x\frac{dV}{dx}=(V+1)^2\]
Separating variables,
\[(V+1)^{-2}dV=\frac{1}{x}dx\]
Integrating,
\[\int (V+1)^{-2}dV=\int\frac{1}{x}dx+\ln C\]
Where $\ln C$ is constant of integration
\[\frac{(V+1)^{-1}}{-1}=\ln x+\ln C\]
\[\frac{-1}{V+1}=\ln (Cx)\]
\[V+1=\frac{-1}{\ln (Cx)}\]
\[V=-1-\frac{-1}{\ln (Cx)}\]
From (2)
\[\frac{y}{x}=-\left[1+\frac{1}{\ln (Cx)}\right]\]
\[y=-x\left[1+\frac{1}{\ln (Cx)}\right]\]
Hence general solution of (1) is
\[y(x)=-x\left[1+\frac{1}{\ln (Cx)}\right]\]