(a) 332 W
First of all, we need to calculate the energy spent in each part of the race.
The duration of the first part is

And the average power in this part is

So the energy spent is

Similarly, the duration of the second part is

And the average power in this part is

So the energy spent is

So the total energy consumed is

And the total time taken is

Therefore, the average power output of the cyclist during the whole race is

(b) 6870 kcal
We know that the output energy needed by the cyclist to finish the race is

However, the human body converts only 25.0% of the input energy
into output energy. So we can write

From which we find the food energy that the cyclist must consume:

And keeping in mind the conversion between joules and calories:
1 cal = 4.18 J
We find:
