Let the natural length of the spring and its spring constant be #l_0# and #k# respectively. Then, the potential energy of the spring when its length is #l# is given by
#V = 1/2k(l-l_0)^2#
The work done to change the length of the spring is equal to the increase in its potential energy.
So, we have
#1/2k[(12\ "cm"-l_0)^2-(10\ "cm"-l_0)^2] = 6\ "J"#
and
#1/2k[(14\ "cm"-l_0)^2-(12\ "cm"-l_0)^2] = 10\ "J"#
Dividing these eliminates #k# to give
#[(14\ "cm"-l_0)^2-(12\ "cm"-l_0)^2]/[(12\ "cm"-l_0)^2-(10\ "cm"-l_0)^2] = 10/6 = 5/3 implies#
# [(14^2-12^2)"cm"^2-2times(14\ "cm"-12\ "cm")times l_0]/ [(12^2-10^2)"cm"^2-2times(12\ "cm"-10\ "cm")times l_0] = 5/3implies#
# [2times 26\ "cm"-4l_0]/[2times 22\ "cm"-4l_0]=5/3 implies [13\ "cm"-l_0]/[11\ "cm"-l_0] =5/3implies#
# 39\ "cm"-3l_0=55\ "cm"-5l_0quad implies quad 2l_0=16\ "cm"#
Hence
#l_0=8\ "cm"#