Dr Gulshan S. answered 01/05/21
Physics Teaching is my EXPERTISE with assured improvement
Kinetic Energy before Collision = 1/2 M v2
= 1/2 (2m ) v0 2
This get converted into potential energy of spring
PE = 1/2 K X2
Equating two
m v0 2 = 1/2 K X2
Where X = compression of spring
Find X