Principle of conservation of momentum:
It states “The total momentum of a system of masses or moving bodies in any direction remains the same, unless it is acted upon by some external force in that direction.”
If two masses m1 and m2 moving with linear velocities v1 and v2 moving in the same collides then they start moving with the same velocity v.
i.e. momentum before collision = momentum after collision
m1v1 + m2v2 = (m1+m2) v