Just after impact v,
combnation of m1,m2 has velocity v2.
At an
instant the spring is at maximum compression, both blocks would be at
rest.
From energy equation:
12(2m)(v22)=12Kx2
⇒x=√mv22k
Since, the compresion of spring is
23 of max of m3 from centre of mass.
Max
kinetic energy of m3=12k(23x)2=mv236
Therefore, y=1