When block strikes the spring, the kinetic energy of block converts into potential energy of spring ie,
1
2
mv2=
1
2
kx2 where x is compression in spring. ⇒x=√
mv2
k
=√
25×(3)2
100
=√
9
4
=
3
2
=1.5m When block returns to the original position, again potential energy converts into kinetic energy of the block, so velocity of the block is same as before but its sign changes as it goes to mean position. Hence, v=−3ms−1.