Here : Mass of the body $m_{1}=m$
Velocity of the first body $u_{1}=312\, m / \sec$
Mass of second body at rest $m_{2}=2\, m$
Velocity of second body $u_{2}=0$
After combination total mass of the body
$M=m+2m=3m$
Now from the law of conservation of momentum
$M v=m_{1} u_{1}+m_{2} u_{2}$
(where $M=m+2 m=3 m$ )
$3 m v =m \times 3+2 m \times 0$
$v =1\, km / hr$