For each cart, p = m × v is signed, while K = m × v² / 2 is nonnegative. Zero net external impulse conserves the combined momentum. It does not require each cart's momentum or the combined translational kinetic energy to stay unchanged.
An elastic encounter also conserves translational kinetic energy and reverses the relative velocity so the carts separate. A completely inelastic encounter makes them stick at the center-of-mass velocity.
V = (mA × uA + mB × uB) / (mA + mB)
K = P² / (2M) + μ × (uA − uB)² / 2
M = mA + mB · μ = mA × mB / M
At fixed masses and total momentum, relative motion adds nonnegative kinetic energy above the center-of-mass motion. Sticking removes that relative-motion term from translational kinetic energy. The converted energy is not destroyed; this endpoint model does not resolve its other forms.
Momentum and energy equations alone also admit unchanged incoming velocities. For approaching carts, that branch is still approaching and does not describe the separating elastic event.