Let the length of the racetrack be \( D \).
Using the principle that speed is proportional to distance covered in the same time:
From the first condition: \[ \frac{\text{Speed of B}}{\text{Speed of C}} = \frac{D - 45}{D - 90} \]
From the second condition: \[ \frac{\text{Speed of B}}{\text{Speed of C}} = \frac{D}{D - 50} \]
Equating the two ratios: \[ \frac{D - 45}{D - 90} = \frac{D}{D - 50} \]
Cross-multiplication yields: \[ (D - 45)(D - 50) = D(D - 90) \]
Expanding both sides: \[ D^2 - 95D + 2250 = D^2 - 90D \]
Subtracting \( D^2 \) from both sides and rearranging: \[ -95D + 2250 = -90D \Rightarrow -5D = -2250 \Rightarrow D = 450 \]
\[ \boxed{D = 450} \]