m1*v1 + m2 *v2 = (m1 + m2) vf
Where:
m = mass
v = velocity
Since it is a perfect inelastic collision both final velocities are equal:
4th row:
5*2 + 10*0 = (5+10) vf
10 + 0 = 15 vf
10 = 15 vf
vf = 10 /15
vf= 0.6667 m/s
V1f = v2f
5th row:
10*2 + 10*0 = Vf (10 +10 )
20 + 0 = vf 20
20 = 20 vf
vf = 20/20
vf= 1 m/s