Let the speeds of P and Q be \( 3x \) and \( 4x \) respectively.
The total distance of the race is 500 m. P has already covered 140 m, so the remaining distance for P to cover is:
\[
500 - 140 = 360 \text{ m}.
\]
Since P takes time to cover 360 m, the time taken by P is:
\[
\text{Time taken by P} = \frac{360}{3x} = \frac{120}{x}.
\]
Now, Q starts the race when P has covered 140 m. In the same time, the distance covered by Q is:
\[
\text{Distance covered by Q} = \text{Speed of Q} \times \text{Time} = 4x \times \frac{120}{x} = 480 \text{ m}.
\]
Since the total length of the race is 500 m, the remaining distance between P and Q when P finishes the race is:
\[
500 - 480 = 20 \text{ m}.
\]
Thus, the distance between P and Q when P wins the race is 20 meters.