P. 3824. Two carts are connected with a piece of rope and stay at rest on a horizontal tabletop. Their masses are m1 and m2. A highly compressed spring is placed between the carts. (The rope keeps the spring in the compressed state.) Than the rope is burnt, and the m1 mass moves with an initial speed of v1. Find the energy stored in the spring.