2 Mass Spring System

A mass M is attached to the left end of a spring with a spring constant K and a mass 4M is attached to the right end. A third mass of mass M slides with velocity v and hits mass M in a completely inelastic collision.

What is the velocity of the smaller mass and of the larger mass when the spring is maximally compressed?

What is the maximum compression of the spring?

Solve in terms of the variables; the surface is frictionless.

What I did was assume both springs have 0 velocity at maximal compression, and just solved for the compression by equating the elastic potential energy with the kinetic energy of the masses the instant after impact. I know my assumption is very unsound.

For an inelastic collision, conservation of energy does not apply, one must use conservation of momentum. It will be useful to note that in a completely inelastic collision, both masses will 'stick together' forming a single body.

Next, you should realise that whatever force is exerted on the smaller mass (2M) by the spring is also exerted on the larger mass.