Let the distance of the first part of the race be x, and that of the second part, 15 - x, then
x/8 + (15 - x)/20 = 1.125
5x + 2(15 - x) = 40 x 1.125
5x + 30 - 2x = 45
3x = 45 - 30 = 15
x = 15/3 = 5
Therefore, the distance of the first part of the race is 5 miles and the time is 5/8 = 0.625 hours or 37.5 minutes
The distance of the second part of the race is 15 - 5 = 10 miles and the time is 1.125 - 0.625 = 0.5 hours or 30 minutes.