In order to solve this question we need to use the principle of conservation of momentum which states:
The momentum in a closed system remains constant before and after a collision or explosion.
I.E.
momentum before=momentum after
And ingeneral momentum is calculated using: P=mv where P is the momentum, m is the mass of the object, and v is the velocity of the object.
Hence the total momentum before the collision is:
P1+P2
=m x 2v + 3m x -v NOTE: notice the negative v on the second truck as it is moving in the opposite direction to the first truck
=-mv
After the collision the the trucks stick together so the total mass becomes 4m and the combined trucks move at an unknown speed of vafter
We will solve the equation for conservation of momentum to determine vafter:
mv=4mvafter
cancelling out the m's:
v=4vafter
and rearranging to make vafter the subject of the equation:
vafter=0.25v
Which is our final answer.