When block P is released from rest from a distance 3l/2 toward right from mean position, this will be the amplitude of oscillation,so velocity of block when passing from its mean position is given as
If mass m1 is added to it and just after if velocity of combined block becomes v1 , from momentum conservation we have
If this is the velocity of combined block at mean position, it must be given as
Where A1 and ω1 are the new amplitude and angular frequency of SHM of the block. It is given that combined block just reaches the left wall thus the new amplitude of oscillation must be l so we have