We can treat each distance distance traveled by the four wheelers are vectors. Their sum must be zero since the last four wheeler truck ends up where the first four wheeler truck started
d1∠1 + d2∠2 + d3∠3 + d4∠4 + d5∠5 = 0
d5∠5 = - (d1∠1 + d2∠2 + d3∠3 + d4∠4)
Since we don't know the speed of the fifth wheeler, we just add the angles and equate it to 360
20 + 30 + 0 + -40 + ∠5 = 360
∠5 = 350 or -10
The fifth wheeler must travel at an angle of -10 degrees.