Colliding carts push equally and oppositely for the same time, so the momentum one loses the other gains; the total is unchanged.
Example
Because colliding carts push on each other equally and oppositely for the same time, the momentum one loses the other gains — the total is unchanged, which pins down the speed after they stick.
highlighted = computed this step
Add up the momentum before
Cart A, 2 kilograms at 3 metres per second, has 6 kilogram metres per second. Cart B, 1 kilogram, sits still with zero. The total before is 6.
pbefore=2kg⋅3m/s+0=6kgm/s
Why the total cannot change
During the bump, A pushes B forward and B pushes A back equally hard for the very same time. Equal and opposite forces over the same time are equal and opposite impulses, so whatever momentum A loses, B gains. The total stays put.
pbefore=pafter
Share the momentum over the joined mass
They stick, so the combined 3 kilograms carries the same 6 kilogram metres per second. The shared speed is 6 over 3, which is 2 metres per second. Momentum is conserved in every collision; sticking is just the easiest because there is a single final speed. Some motion energy is lost in the crunch, though, and the next chapter, energy, follows where it goes.
v=mtotalptotal=3kg6kgm/s=2m/s
mechanicsA 2 kg cart at 3 m/s striking and sticking to a 1 kg cart gives a clean shared 2 m/s.