Theory
Speed tells you how much distance changes in a given time. On a straight rising section of a distance-time graph, speed = change in distance / change in time. Take the differences between the two ends of the section, not their coordinates separately.
On the diagram, the first section goes from (0 hours, 0 km) to (2 hours, 80 km). The traveller covers 80 km in 2 hours, so the speed is 80 / 2 = 40 km/h.
The flat section from 2 to 3 hours has no change in distance, so its speed is 0 km/h. From 3 to 4 hours the distance rises from 80 to 100 km: 20 km in 1 hour, or 20 km/h.
Average speed for the whole journey is total distance travelled divided by total time, including stops. Here the distance never falls, so total distance travelled is 100 km and average speed is 100 / 4 = 25 km/h.
A steeper line means a higher speed only when the graph axes keep the same scales. Always attach the units, such as km/h or m/s, to a calculated speed.