The average rate of change of g(x) over the interval [2, 8] is given by
(g (8) - g (2)) / (8 - 2)
In other words, it's the slope of the line through the points (2, g (2)) and (8, g (8)).
Use the definition of the function to evaluate it at the points in the numerator:
• 8 ≥ 4, so using the second piece, g (8) = -0.5(8) + 8 = 4
• 2 < 4, so g (2) = 5(2) + 1 = 11
Then the average rate of change is
(g (8) - g (2)) / (8 - 2) = (4 - 11) / 6 = -7/6