The sketches below represent the system before and after the collision


Since momentum is conserved in this collision, we can set the total momentum of the system before the collision equal to the total momentum after the collision:

But here we have two unknowns, vf1 and vf2, and only one equation. We can generate another equation containing the same variables if we remember that both momentum and kinetic energy are conserved in an elastic collision.

Substituting the equation solved above for vf1 into the equation for conservation of kinetic energy, we get one equation with only one unknown, namely vf2. Substituting the known values into this equation and solving for vf2 gives vf2 = +2.3 m/s. Solving for vf1 in the equation above gives vf1 = - 2.7 m/s.
It can be shown that if we solve the equations for conservation of momentum and conservation of kinetic energy simultaneously, it always turns out that the relative speeds of the two masses remains the same (except for a negative sign) before and after a perfectly elastic collision regardless of the masses of the two objects. That is,
v01 − v02 = − (vf1 − vf2)
Collisions in Two Dimensions