From the law of conservation of momentum we have:
m1u1=m1v1+m2v2.Since collision is perfectly elastic, kinetic energy is conserved and we can write:
21m1u12=21m1v12+21m2v22.This formula gives us an additional relationship between velocities. Therefore, with the help of these two formulas we can find the velocity of the second cart after the collision:
v2=(m1+m2)2m1u1,v2=(4 kg+2 kg)2⋅4 kg⋅3 sm=4 sm.The sign plus means that the second cart moves to the right.
Comments