Thank you for the opportunity to help you with your question!

First, let's remember the potential energy stored by the spring would be:

E = (1/2)(K)(X^2) ; where: E is the potential energy (in Joules), K is the constant of the spring (in N/m) and X is the distance (in this case what the spring is compressed, in meters).

So from the above formula we solve for K like this:

E = (1/2)(K)(X^2) -----------> 2*E = 2*(1/2)(K)(X^2) ------------> 2E = (K)(X^2)

2E = (K)(X^2) ---------------> 2E/X^2 = (K)(X^2)/X^2 ---------------> 2E/X^2 = K so K = (2E)/X^2

So it is giving X = 12.0 cm (we need to convert it into meters) and W = 72.0 J. Then we have:

X = 12.0 cm * (1 m/ 100cm) = 0.12 m ------> X = 0.12 m