[tex]\dfrac{\mathrm dx}{\mathrm dt}=\dfrac{t^2+3tx+x^2}{t^2}[/tex]
[tex]\dfrac{\mathrm dx}{\mathrm dt}=1+\dfrac{3x}t+\dfrac{x^2}{t^2}[/tex]
Let [tex]x(t)=ty(t)[/tex], so that [tex]\dfrac{\mathrm dx}{\mathrm dt}=t\dfrac{\mathrm dy}{\mathrm dt}+y[/tex].
[tex]t\dfrac{\mathrm dy}{\mathrm dt}+y=1+3y+y^2[/tex]
[tex]t\dfrac{\mathrm dy}{\mathrm dt}=1+2y+y^2=(1+y)^2[/tex]
[tex]\dfrac{\mathrm dy}{(1+y)^2}=\dfrac{\mathrm dt}t[/tex]
[tex]\implies-\dfrac1{1+y}=\ln|t|+C[/tex]
[tex]\implies y+1=-\dfrac1{\ln|t|+C}[/tex]
[tex]\implies yt=x=-t-\dfrac t{\ln|t|+C}[/tex]