Answer
The solution of the differential equation is given by
$$
\frac{x}{y+x} +ln | x |=c
$$
where c is an arbitrary constant.
Work Step by Step
$$
(x^{2}+3xy+y^{2})dx-x^{2}dy=0
$$
this equation can be written as the following
$$
y^{'}=\frac{dy}{dx}=\frac{x^{2}+3xy+y^{2} }{x^{2}} \quad (*)
$$
Divide each term in the numerator and denominator by the highest power of $ x$ , namely $x^{2}$. We obtain
$$
y^{'}=\frac{dy}{dx}=1+3(\frac{y}{x})+(\frac{y}{x})^{2} = f(x,y)
$$
where $f(x,y)$ can be expressed as a function of the ratio $\frac{y}{x}$ only .
Thus eq. (*) is homogeneous.
Now we assume a new dependent variable $ v = \frac{y}{x }$
and we can express
$$
y^{'}=\frac{dy}{dx}= x \frac{dv}{dx}+v = 1+3(\frac{y}{x})+(\frac{y}{x})^{2}
$$
$$
x \frac{dv}{dx} = 1+3v+v^{2}-v= v^{2} +2v+1 \quad (**)
$$
The differential equation (**) is separable and can be written as
$$
[\frac{1}{{{ v^{2} +2v+1}}}] dv= \frac{dx}{x}
$$
integrating the left side with respect to $v$ and the right side with respect to $x$ gives
$$
\int{ \frac{dv}{ (v+1)^{2}}} =\int{ \frac{dx}{x}}
$$
we can obtain $v$ implicitly in terms of $ x$ as the follows
$$
\frac{1}{v+1} +ln | x |=c
$$
where c is an arbitrary constant.
we find the solution of Eq. (*) by replacing $v$ by $ y/x $ in the previous expression,
$$
\frac{1}{(\frac{y}{x})+1} +ln | x |=c
$$
Hence the solution of eq. (*) given by
$$
\frac{x}{y+x} +ln | x |=c
$$
where c is an arbitrary constant.