Derivation of Discharging Current of an Inductor
Kirchoff's voltage law states that the algebraic sum of the voltages equals zero for any closed path (loop) in an electrical circuit. Writing the equation for the voltage loop with the inductor and resistor gives
$$L \frac{di_L(t)}{dt}+Ri_L(t)=0 $$
Dividing with the resistance on both sides gives
$$\frac{L}{R}\frac{di_L(t)}{dt}+i_L(t)=0 $$
The form of this differential equation  indicates that that the solution for \$ i_L(t)\$ must be a function that has the same form as its first derivative. Such a function is an exponential function.
We make the guess that the solution is of the form \$i_L(t)=Ke^{st} \$ in which \$ K\$ and \$ s\$ are constants to be determined. Inserting the guess in the actual differential equation gives
$$ \frac{L}{R}Kse^{st}+Ke^{st}=0$$
From this, we see that the equation is true if \$s=-\frac{R}{L} \$
Inserting this value for \$s \$ into \$i_L(t)=Ke^{st} \$ gives
$$i_L(t)=Ke^{\frac{-tR}{L}} $$
Calling \$ \tau=\frac{L}{R} \$ gives
$$i_L(t)=Ke^{\frac{-t}{\tau}} $$
All that's left is to determine \$K \$, and I will leave that to you. Hint: what is \$i_L(0) \$?