Momentum is always conserved... when all degrees of freedom are taken into account.
In a system that only takes into account the two carts, the total momentum of the system will seem to not have been conserved. But of course the lost momentum didn't simply vanish. There were likely frictional losses from the carts' contact with the air-track that went into the imperceptible movement of the track and the ground underneath it.
The answer is:
Momentum changed slightly due to friction.