There are only blue and red cars driving on a road. Given the average speed of all of the cars $v_0$, the average speed of the blue cars $v_b$ and the average speed of the red cars $v_r$ derive a formula for the proportion $p_b$ of blue cars on the road.
I know that the formula is given by:
$$p_b = \frac{v_0 - v_r}{v_b - v_r}$$
However I do not understand how to derive it. Can you show me how?
Let $n$ be the total number of cars, with $n_b$ blue, and $n_r$ red, so that $n_b+n_r=n$. Then:
$v_0=\frac{v_r\cdot n_r+v_b\cdot n_b}{n}$.
Define $p_b=n_b/n=1-n_r/n$, and solve the above.