Solving First Order ODE using the integrating factor approach 


I am trying to solve the differential equation, but I do not understand the method. Here is my working:
 

From the first diagram-
$\frac{di}{dt} + i = 10t.e^{-t}$
Multiply equation by $e^t$
$\frac{di}{dt}.e^t + i.e^t = 10t$
Now $\frac{di}{dt}.e^t  + i.e^t  = \frac{d}{dt}(i.e^t)$
So we have $\frac{d}{dt}(i.e^t) = 10t$
Now integrate to solve further.
Step 3-
$\frac{d}{dt}(i.e^t) = i.\frac{d}{dt}(e^t) + e^t\frac{di}{dt}(i)$
= $i.e^t + \frac{di}{dt}.e^t$
