Answer
${\bf 0.20}\;\rm J$
Work Step by Step
This energy stored in the inductor is given by
$$U_{\rm L}=\frac{1}{2}LI^2\tag 1$$
We know that this energy depends on the inductance and the current.
According to Ohm's law, the
$$\varepsilon=IR_{tot}=I(R_{\rm inductor }+r)$$
Hence,
$$I=\dfrac{\varepsilon}{R_{\rm inductor }+r}$$
Plug into (1),
$$U_{\rm L}=\frac{1}{2}L\left[\dfrac{\varepsilon}{R_{\rm inductor }+r}\right]^2$$
Plug the known;
$$U_{\rm L}=\frac{1}{2}(100\times 10^{-3})\left[\dfrac{(12)}{4+2}\right]^2$$
$$U_{\rm L}=\color{red}{\bf 0.20}\;\rm J$$