If we say both Truck have mass M kg. Then the initial momentum is (6M+0M)kgms^-1= 6M kgms^-1

After the collision we have the mass of the whole 'body' = 2M kg

and we'll say the 'body' is travelling at Vms^-1. Therefore momentum after collision = 2MV kgms^-1

As momentum is conserved

we have,

6M = 2MV --> 3=V

V= 3ms^-1.

Now, make sure you understand the working by trying some other examples.