Two masses of 20 and 10 kg are moving in the same direction and one directly behind the other. The 20-kg mass is behind and moving at 10m/s and the other is moving at 5m/s. The masses collide and after the collison, the 20kg mass moves at 6m/s find the after-collison velocity of the 10kg mass.

I can't find the formula for this problem

You need to apply principles: First, the conservation of momentum,

total momentum before collision = total momentum after collion.

20*10 + 10*5= 20*6 + 10*velocity

check that.