Brian F. answered 11/05/19
Graduate Researcher in Physics with 5+ Years Teaching Experience
This is a problem regarding conservation of momentum. Each cart has an initial momentum, its mass multiplied by its velocity. After they collide and stick together, they are now a single unit of combined mass 4 kg + 5 kg, the new velocity will have to reflect momentum conservation.
Let's assume the 4 kg cart is approaching from the left, while the 5 kg cart approaches from the right. This gives the 4 kg cart a velocity of +12 m/s and the 5 kg cart a speed of -9 m/s.
The initial momenta of the carts are
(4 kg) * (12 m/s) = 48 (kg *m)/s
and
(5 kg) * (-9 m/s) = -45 (kg * m)/s
Added together, this is a total initial momentum of 48 + (-45) = 3 (kg * m)/s
The momentum after collision must be unchanged from before (conservation of momentum). Thus,
(9 kg) * (new speed) = 3 (kg * m)/s
The joined carts are now traveling to the right with a speed of 1/3 m/s.