To work this problem, you must assume that Juan's pedaling speed adds to the wind speed when going downwind, and that the wind speed subtracts from Juan's pedaling speed going upwind. (In other words, Juan's pedaling speed is relative to the air, not the ground.)
Let w represent the wind speed in miles per hour.
... distance = speed × time
Juan's total distance is 40 miles, so we have ...
... 40 = (11.5 +w)×1.75 + (11.5 -w)×2.50
... 40 = 48.875 - 0.75w . . . . . simplify
... -8.875/-0.75 = w . . . . . . . . subtract 48.875, divide by -0.75
... w = 11.833... = 11 5/6
The wind was blowing 11 5/6 miles per hour.
_____
Compared with real-life experience, and working through the details, this problem makes no sense whatever. Pedaling a bicycle is not like rowing a boat, where the current of the medium directly affects speed.
If you work through the segments of the problem, you find that Juan traveled 40.833 miles with the wind in the first 1.75 hours, so actually finished the race and then some. He spent the next 2.5 hours being blown backward by the wind, even though he was pedaling forward at 11.5 mph. (How much sense does that make?)