Part A.) The midpoint between the two speeds is just an estimate of the exact average speed. This is not exactly 27 m/s because although they have the same distance, they differ in speed. So, the answer is more or less, but not equal to, 27 m/s.
Part B.) The average speed is the total amount of distance traveled per total time.
Convert miles to meters: 1 mile = 1,609.34 meters
8 miles* 1,609.34 m/1 mile = 12,874.72 m
Average Speed = (12,874.72 m + 12,874.72 m)/[(12,874.72 m/24 m/s)+ (12,874.72 m/30 m/s)]
Average speed = 26.67 m/s