At the bottom of the incline:
Energy lost by the block as the spring slows it to a stop (the block's kinetic energy at the bottom of the incline) = Energy gained by the spring
= (1/2)(100N/m)(1m)^2 = 50J
As the block slides down the incline:
Energy at the top = Energy at the bottom
Ki + Ui = Kf + Uf
Ui = Kf
mgh = 50 J where h is the height of the incline (the altitude)
(√2kg)(9.81m/s2)(h) = 50J
h = 50/(√2x9.81) m
h = 50/13.87 m
h = 3.6 m
The incline is a right triangle with height h (the altitude) and hypotenuse d (the plane length).
sin45o = h/d,
then d = 5m.
Hence, the distance travelled by block before it comes to rest is 5m.