Two blocks m1 and m2 are connected by an ideal spring of force constant k. The blocks are placed on smooth horizontal surface. A horizontal force F acts on the block m1. Initially spring is relaxed, both the blocks are at rest. What is maximum elongation of spring? i think it would be when both the objects are moving with same velocity, so i applied law of conservation of energy but the equation has too many variables.