The potential energy stored in a spring is given by:

where k is the spring constant and x is the distance the spring is compressed or elongated from the equilibrium position. In this case we have that:

Plugging these in the expression for the potential energy we have:

Therefore, the energy stored in the spring is 53.8 J