A cart of mass

m1 = 12 kg
slides down a frictionless ramp and is made to collide with a second cart of mass
m2 = 21 kg,
which then heads into a vertical loop of radius 0.26 m, but the carts stick together after the collision.Find the height h from which cart 1 would need to start to make sure that both carts complete the loop without leaving the track.