Initially the block moves with constant speed 3 m/s on a smooth surface.
Then for a distance 2.14 m, it is subjected to friction provided by rough surface.
friction force = μN = μmg = 0.2×0.5×9.8 = 0.98 N
Retardation experienced by the block = force/mass = 0.98/0.5 = 1.96 m/s2
speed after travelling 2.14 m rough path:- v2 = 9 - 2×1.96×2.14 , we get v = 0.78 m/s
after travelling 2.14 m rough path, the block is stopped by spring. Let the spring has compressed by a distance x.
Then the stopping force provided by the spring is kx, where k is force constant of the spring.
since the block is stopped, we get the distance x moved from, x = u2 / (2×ar )..............(1)
where u is initialvelocity and ar is the retardation provided by the spring. Retardation is given by, ar = kx/m = 2x/0.5 = 4x
hence we rewrite eqn.(1) to get x : x = u2 / (2×4x) or x2 = u2 / 8 = (0.78×0.78)/8 = 0.07605
hence x = 0.28 m = 28 cm