The sum of products of masses and velocities of two moving bodies before and after the collision remains the same. Name the relevant law.
The product of mass and velocity of object is called momentum, or impulse.
The name of the corresponding law is law of conservation of momentum. It can be derived from Newton's laws of motion.
Bear in mind that momentum is a vector quantity (as velocity) and it is necessary to consider the direction(s) of momentum(s) to obtain a correct equations.