Potential energy in a spring is proportional to the square of the extension ($PE \propto x^2$). If the stretch increases from 2 cm to 10 cm (a factor of 5), the PE will increase by a factor of $5^2 = 25$.