Work is equal to a force applied over a net distance (aka displacement) . Net distance is the difference between your starting and ending point. So if you push a box from point A to point B, and then push it back from point B to point A, no work will be done.
In your diagram, for part 1, it...