Alright, simple math time.
Lets assume a perfectly flat out and back ride, 10km each way. Our rider has a CdA of 0.32 m^2, density of air that day is 1 kg/m^3 and our rider has some really nice tires which have zero rolling resistance.
The only force the rider is facing is drag Fd = 0.5 * 1 * 0.32 * v^2 = 0.16 kg/m * v^2
Now lets say our rider goes out on a windless day and keeps a constant 200W throughout.
P = W/t = F*d/t = F * v = 0.16 * v^3 = 200W
Our rider would keep a constant velocity of 10.77 m/s or 24mph on a windless day.
Now he goes out on a day where the wind is blowing at 22.4mph (10 m/s)
For the headwind leg:
P = F * v = 0.16 * (v + 10)^2 * v = 200W
v = 5.32 m/s for 31.3 minutes
Tailwind leg:
P = F * v = 0.16 * (v - 10)^2 * v = 200W
v = 18.27 m/s for 9 minutes
Average velocity:
vavg = d/t = 20km/40.3min = 8.27 m/s or 18.5mph on a day with 22mph winds keeping constant 200 watts.
Now, if he hammers at 250W the first leg and keeps it at 180W the second leg, following the same calculation he would get an average speed of 20.2mph.
If he goes crazy and keeps 300W upwind and then 200W downwind, he gets 21.9mph.
Did that quickly so feel free to check my numbers.