If a spring extends by x on loading, then the energy stored by the spring is (if T is tension in the spring and k is spring constant)
T22x
T22k
2xT2
2T2k
U = F22K = T22K