Notice, notice that the energy is given by:
$$\text{E}\left(t\right)=\int\text{P}\left(t\right)\space\text{d}t=\int\text{V}\left(t\right)\cdot\text{I}\left(t\right)\space\text{d}t\tag1$$
The voltage-current relation in an inductor is given by:
$$\text{V}_\text{L}\left(t\right)=\text{I}_\text{L}'\left(t\right)\cdot\text{L}\tag2$$
So, we get:
$$\text{E}_\text{L}\left(t\right)=\int\text{I}_\text{L}'\left(t\right)\cdot\text{L}\cdot\text{I}_\text{L}\left(t\right)\space\text{d}t=\text{L}\int\text{I}_\text{L}'\left(t\right)\cdot\text{I}_\text{L}\left(t\right)\space\text{d}t=\text{L}\cdot\frac{\text{I}_\text{L}^2\left(t\right)}{2}+\text{k}\tag3$$
So, assuming that \$\displaystyle\text{E}_\text{L}\left(0\right)=\text{I}_\text{L}\left(0\right)=0\$, we get \$\displaystyle\text{k}=0\$.
So, back to your circuit. We can see that:
$$\text{I}_\text{L}\left(t\right)=\mathscr{L}_\text{s}^{-1}\left[\frac{\displaystyle\frac{\displaystyle\hat{\text{u}}_\text{i}}{\displaystyle\text{s}}}{\text{R}+\text{sL}}\right]_{\left(t\right)}=\frac{\displaystyle\hat{\text{u}}_\text{i}}{\displaystyle\text{R}}\cdot\left(1-\exp\left(-\frac{\displaystyle\text{R}t}{\displaystyle\text{L}}\right)\right)\tag4$$
So, we get:
$$
\begin{alignat*}{1}
\text{E}_\text{L}\left(t\right)&=\text{L}\cdot\frac{1}{2}\cdot\left(\frac{\displaystyle\hat{\text{u}}_\text{i}}{\displaystyle\text{R}}\cdot\left(1-\exp\left(-\frac{\displaystyle\text{R}t}{\displaystyle\text{L}}\right)\right)\right)^2\\
\\
&=\frac{\displaystyle\text{L}\hat{\text{u}}_\text{i}^2}{\displaystyle2\text{R}^2}\cdot\left(1-\exp\left(-\frac{\displaystyle\text{R}t}{\displaystyle\text{L}}\right)\right)^2\\
\\
&=\frac{\displaystyle\text{L}\hat{\text{u}}_\text{i}^2}{\displaystyle2\text{R}^2}\cdot\left(1+\exp\left(-\frac{\displaystyle2\text{R}t}{\displaystyle\text{L}}\right)-2\exp\left(-\frac{\displaystyle\text{R}t}{\displaystyle\text{L}}\right)\right)
\end{alignat*}
\tag5
$$
Now, we can notice that when \$\displaystyle t\to\infty\$ we get:
$$\lim_{t\space\to\space\infty}\text{E}_\text{L}\left(t\right)=\frac{\displaystyle\text{L}\hat{\text{u}}_\text{i}^2}{\displaystyle2\text{R}^2}\cdot\left(1+\underbrace{\exp\left(-\frac{\displaystyle2\text{R}t}{\displaystyle\text{L}}\right)}_{\to\space0}-2\underbrace{\exp\left(-\frac{\displaystyle\text{R}t}{\displaystyle\text{L}}\right)}_{\to\space0}\right)=\frac{\displaystyle\text{L}\hat{\text{u}}_\text{i}^2}{\displaystyle2\text{R}^2}\tag6$$