Set the masses and speeds, then watch two carts collide. Momentum is always conserved — kinetic energy only sometimes is.