Since velocity = distance/time, when distance is plotted against time on a graph, the velocity at any moment is represented by the slope of the graph (the tangent if velocity is not linear, but that's not the case here).
Let's calculate the slopes of the graph in each separate section:
0 to 1: 4m/1s = 4m/s
1 to 2.5: -6m/1.5s = -4m/s
2.5 to 4: 0m/s (graph's tangent is 0 here)
4 to 5: 2m/1s = 2m/s
Now that we have the velocities in each section, we can calculate the averages. To calculate the average between multiple sections, multiply each velocity by the number of seconds the graph is at that velocity, take the sum of those values, then divide by the total number of seconds in the interval.
(a) 0 to 1s: we already calculated this; 4m/s
(b) 0 to 4s: (4m/s * 1s + -4m/s * 1.5s + 0m/s * 1.5s) / 4s = (4-6)/4 = -2/4 = -0.5m/s
(c) 1 to 5s: (-4m/s * 1.5s + 0m/s * 1.5s + 2m/s * 1s) / 4s = (-6+2)/4 = -4/4 = -1m/s
(d) 0 to 5s: (4m/s * 1s + -4m/s * 1.5s + 0m/s * 1.5s + 2m/s * 1s) / 5s = (4-6+2)/5 = 0/5 = 0m/s