The momentum of the system is the same before and after. Every velocity goes in with its sign.
The total kinetic energy is also the same, because this collision is elastic. Every velocity is squared, so there are no signs.
Heavier cart 1 keeps moving forward. Equal masses: it stops. Lighter cart 1 comes back.