I believe the problem your talking about is finding the general solution of: $$ty'(t)-y(t) = t^2e^{-t}, t > 0$$

In that case, this differential is first order but not separable, therefore we will use the method of integrating factors.

Be more specific, what kind of equation is this one.

The first problem that arises is this is not in the standard form we use for integrating factors where $$y'(t) + a(t)y(t) = b(t)$$

So we need to fix that. We can do that by diving every term by $t$ to isolate the derivative term. This produces the equation $$y'(t) - \frac{1}{t}y(t) = te^{-t}$$

Now, we can find the integrating factor which we will denote by $\mu(t)$. $$\mu(t) = e^{\int\frac{-1}{t}dt} = e^{\ln(\frac{1}{t})} = \frac{1}{t}$$

Now we multiply each side of the differential by $\mu(t)$ and isolate for $y(t)$ as follows:

\begin{gather*}

\frac{1}{t}y'(t) - \frac{1}{t^2}y(t) = e^{-t}\implies\\

\frac{d}{dt} (\frac{1}{t}y(t)) = e^{-t}\implies\\

\int \frac{d}{dt} (\frac{1}{t}y(t))dt = \int e^{-t}dt\implies\\

\qquad\qquad\qquad\frac{1}{t}y(t) + c_1 = -e^{-t} + c_2\implies\qquad\qquad\qquad\color{red}{\checkmark}\\

\frac{1}{t}y(t) = -e^{-t} + k\implies\\

y(t) = -te^{-t} + kt.

\end{gather*}

No need to introduce $c_1$ and $c_2$ at all: marked line is excessive

Therefore, the general solution of the above differential is given by: $$ y(t) = -te^{-t} + kt $$

Note that this is only valid when $t > 0$. You can see from above if $t = 0$ this makes no sense as we had to divide by $t$ several times.