The concept required to develop this problem is Hook's Law and potential elastic energy.
By definition the force by Hooke's law is defined as

Where,
k = Spring Constant
x = Displacement
On the other hand, the elastic potential energy is defined as

With the given values we can find the value of the spring constant, that is,




Applying the concepts of energy conservation then we can find the position of the block, that is,





Therefore the position of the block can be then,

