Answer: The velocity of the cart-2 is 2 m/s moving in direction opposite of the cart-1's direction.
Step-by-step explanation:
Mass of cart-1 ,

Velocity of cart-1 before the release of the spring,

Mass of cart-2 ,

Velocity of cart-2 before the release of the spring,

After releasing of the spring:
Velocity of cart-1 after the release of the spring,

Velocity of cart-2 after the release of the spring,

According to law of conservation of momentum:




Negative sign depicts that direction of cart-2 which is moving in the opposite direction of the cart-1's direction. So, the velocity of the cart 2 is 2 m/s.