Using conservation of momentum, you have the total initial momentum in the system is wqual to the total final momentum in the system. 
mv + mv = mv 
plug in all the values 
(20t)(10) + (25t)(5) = (45t)Vfinal
distribute everything
200t + 125t = 45t Vf
simplify
325t = 45t Vf
divide both sides by 45t 
7.22 = Vf 
So their final common velocity is 7.22km/h in the same direction as they were travelling before