Distance travelled by the truck is ~
And it's displacement is ~
See the diagram in attachment for reference ~
Let O be the initial point, It travels 60 km towards west till point B and then 80 km towards north till point P and returns to initial point O in a straight line, now as we can observe here, it forms a right angled Triangle.
The measure of two legs is 60 km and 80 km, let's find the hypotenuse ~
According to Pythagoras theorem ~
hypotenuse² = sum of squares of other two legs
that is ~
So, the distance between the point A and O is 100 km
Now, The total distance is equal to the distance covered through actual path that is ~
And displacement is the distance between the final point and initial point, but since the truck returns to the point from where it started the journey, so the final and initial point is same therefore displacement is equal to 0.