Hi there!
Recall the equation for spring potential energy:
[tex]PE = \frac{1}{2}kx^2[/tex]
k = Spring constant (N/m)
x = extension of spring from equilibrium (m)
PE = Potential Energy (J)
Plug in the given values:
[tex]PE = \frac{1}{2}(4)(2^2) = \boxed{8 J}[/tex]