Two blocks of masses m and 3m are placed on a frictionless horizontal surface

Two blocks of masses M and 3M are placed on a horizontal, frictionless surface. A light spring is attached to one of them, and the blocks are pushed together with the spring between them. A cord holding them together is burned, after which the block of mass 3M moves to the right with a speed of 2.48 m/s.

(a) What is the speed of the block of mass M?
(b) If M = 7.6 kg and the spring constant is 6200 N/m, how much was the spring originally compressed from its equilibrium length?