Given that:
For first hour- 40mph
For 3 hours - 70mph
30 minutes - 0 mph
after that- 70 mph
Here, the speed increases from 40 mph to 70 mph
So the graph here will be move upward.
For 30 min rest, the graph will be flat as distance is not changing with time.
After that it will again increase as it gains 70 mph speed.
Thus, the first graph is the correct one.