Mass of first truck, m1 = 500 kg
Speed of first truck, u1 = 4 m/s
Mass of second truck, m2 = 1500 kg
Speed of second truck, u2 =2 m/s
Combined mass of both trucks, m = 1500 + 500 = 2000 kg
Combined velocity v
Acc. to the law of conservation of momentum
m1 u1 + m2 u2 = mv
500 x 4 + 1500 x 2 = 2000 x v