Consider a block of mass $m_1$ attached to a spring. It's advancing with a slower velocity $v_1$ as compared to that of an approaching block of mass $m_2$'s velocity $v_2$ on the friction-less surface. Obviously, the two blocks will collide.
Now, I have read at several places that the spring compression will be maximum when the two blocks have equal velocities. But I couldn't understand that. It's somewhat counter-intuitive to me because first block is accelerating and the one behind is decelerating so how does that eventually lead to maximum compression in the spring?
Research effort: I asked a friend on the chat room but his explanation was unsatisfactory. I searched for youtube experiments on this (they help immensely in developing concepts intuitively) but couldn't find any. My books too explain this theoretically without any diagrams.
Please supplement your answer with diagrams/ mathematical proof to explain this concept (and other related concepts like maximum elongation ,if possible).