Theory
On a speed-time graph, multiplying speed by time gives distance: (metres per second) x (seconds) = metres. The area between the plotted line and the time axis represents distance travelled when speed is non-negative.
Split a piecewise straight graph into familiar shapes. From 0 to 4 seconds the area is a triangle: 1/2 x 4 x 8 = 16 m. From 4 to 10 seconds it is a rectangle: 6 x 8 = 48 m.
From 10 to 14 seconds the area is another triangle: 1/2 x 4 x 8 = 16 m. Add the three distances to get 16 + 48 + 16 = 80 m for the whole journey.
If a section starts and ends at different non-zero speeds, use a trapezium or split it into a rectangle and triangle. Write the base in seconds and the vertical height in m/s before multiplying.
This area method is different from gradient: the gradient of a speed-time graph gives acceleration, not distance. For a velocity-time graph that drops below zero, signed area gives displacement; total distance uses the absolute areas instead.