William ran for 2 hours.
The distance of an object is the amount of speed covered with respect to time.
Mathematically:
[tex]\mathbf{speed = \dfrac{distance}{time}}[/tex]
From the given information:
Elliot ran for 8 miles in x speed, the time at which he ran can be computed as:
[tex]\mathbf{= \dfrac{8}{x}}[/tex] hours
William ran for 12 miles in x speed, the time at which he ran can be computed as:
[tex]\mathbf{= \dfrac{12}{x}}[/tex] hours
If Elliot finished his race 40 minutes fewer than William, then we have:
[tex]\mathbf{=\dfrac{40}{60} \ hour= \dfrac{2}{3 } hour}[/tex]
Therefore, the distance at which William ran for can be computed by using the relation:
[tex]\mathbf{\dfrac{8}{x}+\dfrac{2}{3}= \dfrac{12}{x}}[/tex]
[tex]\mathbf{\dfrac{2}{3}= \dfrac{12}{x}- \dfrac{8}{x}}[/tex]
By solving for x,
[tex]\mathbf{\dfrac{2}{3}= \dfrac{4}{x}}[/tex]
By cross multiply;
2x = 12
x = 12/2
x = 6 miles per hour
Thus, William ran for:
= 12 miles/ 6 miles per hour
= 2 hours
Learn more about distance here:
https://brainly.com/question/17273444