Linear momentum is defined as the product of mass by Velocity. In this way, by means of the following equation, we can calculate the momentum.
where:
m = mass [kg]
v = velocity [m/s]
Since all momentum is transferred, we can say that this momentum is equal for the mass of 5 [kg]. In this way, we can determine the speed after the impact.