First:
SPEEDa*time=SPEEDb*time+50
and
SPEEDa*time=1000
so we got two speed relation:
SPEEDb=0.95*SPEEDa
Second:
Since the time is same for both, so:
The distance of A run: SPEEDa*time
The distance of B run: SPEEDb*time=.95*SPEEDa*time
Let's assume A reachs the final line first, let's see how long can B run:
time=1050/SPEEDa
Distanc of B = time*SPEEDb=(1050*/SPPEDa)*(.95*SPEEDa)
=997.5meter
So we can conclue that: when A reach to the finish line, B has only run 997.5 meter. So A is still a winner