In order to answer this question, you first need to define some terms:
r = # of miles run
b = # of miles biked
EQUATION SETUP:
I know that the number of miles run added to the number of miles biked must add up to the total race miles:
r + b = 82
I also know that to find the amount of hours spent running I need to divide the number of miles run by 8 since I run 8mph (for example: 16mi / 8mph = 2hr), and do the same for number of miles biked and bike speed. So:
7 = r/8 + b/21
TO SOLVE: (SUBSTITUTION STRATEGY)
From there, the simplest way to isolate r or b is to solve r + b = 82 for b (or r but I will solve for b):
b = 82 - r
And then substitute the value of b into our other equation:
7 = r/8 + (82 - r)/21
SOLUTION:
From there, you solve by multiplying all terms in the equation by 8 and 21 to eliminate the denominators...
7*8*21 = r*21 + (82 - r)*8
Multiply and distribute...
1176 = 21r + 82*8 - 8r
Combine like terms and multiply...
1176 = 13r + 656
Combine like terms again...
520 = 13r
Divide by 13 to solve for r...
40 = r
Plug 40 in for r in our equation for b (b = 82 - r)...
b = 82 - 40 = 42
ANSWER:
The distance of the run is 40 miles, and the distance of the bicycle race is 42 miles.