Mass of first truck, m_{1} = 500 kg

Speed of first truck, u_{1} = 4 m/s

Mass of second truck, m_{2} = 1500 kg

Speed of second truck, u_{2} =2 m/s

Combined mass of both trucks, m = 1500 + 500 = 2000 kg

Combined velocity v

Acc. to the law of conservation of momentum

m_{1} u_{1} + m_{2 }u_{2} = mv

500 x 4 + 1500 x 2 = 2000 x v