Verified Answer :

If \(t\) is just a constant, then you have a fairly simple (separable) ODE.

\(t^2\dfrac{\mathrm dy}{\mathrm dx}+y^2=ty\implies \dfrac{\mathrm dy}{ty-y^2}=\dfrac{\mathrm dx}{t^2}\)

and so on.

So, I'll assume you meant to write \(\dfrac{\mathrm dy}{\mathrm dt}\)...

\(t^2\dfrac{\mathrm dy}{\mathrm dt}+y^2=ty\)

This is a standard Bernoulli equation, which means a substitution of \(y=z^{1-2}=z^{-1}\) will suffice to transform this ODE in \(y\) into a linear ODE in \(z\). You have

\(\dfrac{\mathrm dy}{\mathrm dt}=\dfrac{\mathrm dy}{\mathrm dz}\times\dfrac{\mathrm dz}{\mathrm dt}\)
\(\dfrac{\mathrm dy}{\mathrm dt}=-\dfrac1{z^2}\dfrac{\mathrm dz}{\mathrm dt}\)

which changes the ODE to

\(-\dfrac{t^2}{z^2}\dfrac{\mathrm dz}{\mathrm dt}+\dfrac1{z^2}=\dfrac tz\)
\(\dfrac{\mathrm dz}{\mathrm dt}+\dfrac1tz=\dfrac1{t^2}\)

An integrating factor would be

\(\mu(t)=\exp\left(\displaystyle\int\frac{\mathrm dt}t\right)=t\)

Multiplying both sides by the IF gives

\(t\dfrac{\mathrm dz}{\mathrm dt}+z=\dfrac1t\)
\(\dfrac{\mathrm d}{\mathrm dt}[tz]=\dfrac1t\)

Integrate both sides wrt \(t\) to get

\(tz=\displaystyle\int\dfrac{\mathrm dt}t=\ln|t|\)
\(z=\dfrac{\ln|t|+C}t\)

Now back substitute. Since \(y=\dfrac1z\), you get \(z=\dfrac1y\) and the solution is

\(y=\dfrac t{\ln|t|+C}\)