We are given a graph of position vs time. We are asked to determine the following.
Part 1. To determine the displacement we will use the following formula:

Where:

The final position is the position at "t = 24s" and the initial position is at "t = 0s". From the graph we have:

Now, we plug in the values:

Therefore, the displacement is -12 meters.
Part 2. We are asked to determine the total distance from 0s to 24s. To do that we will determine the displacements from 0 to 8s, from 8s to 16s, and from 16s to 24s:

Now, we plug in the initial and final values:

Solving the operations we get:

Therefore, the total distance is 12 meters.