(2) 4
When mass M is moved a distance ‘a’ towards wall 1; spring S1 gets compressed by ‘a’. However spring S2 has no change in its length because mass M2 is free to move. The energy U1 of system is due to compression of spring S1 only.
On being released, block B moves towards equilibrium position, overshoots the position and compresses
S2 by a/2 before coming to rest. Now mass M1 detatches itself from wall and there is no change in length of S1. The energy of system, U2 , is now due to compression of spring S2 only.
From law of conservation of energy U1 = U2 i.e