# Distance between City A and City B

Problem:

Randy and Sam start walking at the same time from opposite ends A and B, respectively. Randy is moving to the direction of B and Sam to the direction of A. When they arrive at their destination, they immediately return to their original places. They keep repeating the same process for several times. It is known Randy’s speed is 2.5 times than Sam’s speed, the distance when the two meet for the second time and the fourth time is 200 meters. What is the distance between City A and City B in meters?

Solution:

The ratio in time that Randy and Sam completed one whole round is 2:5.

Hence, 200/(3/7-1/3)=2100.

But, I don't know where that 3/7 and 1/3 came from.

• I would bet that $7=2+5, 3=5-2$. If this is all the solution you got for this problem there should be a general approach shown that explains this. Jul 24, 2018 at 14:42

Let the distance between $A$ and $B$ be $L$ and measure distances from $A$. The first time they meet is at $\frac {5L}7$. The second time they meet Randy has gotten to $B$ and is on the way back, chasing Sam. If they meet at point $d$ Randy has made two trips less $d$ and Sam has covered $L-d$. We have $$(2L-d)=2.5(L-d)\\d=\frac 13L$$ Randy continues back to $A$, turns around, meets Sam for the third time and continues on to $B$. Sam continues to $A$ and turns around, meeting Randy on the way back for the fourth time. If they meet at $f$ we have $$(4L-f)=2.5(L+f)\\1.5L=3.5f\\f=\frac 37L$$ We are told these are $200$ apart, so $$(\frac 37-\frac 13)L=200\\L=\frac {200}{\frac 37-\frac 13}\\L=200\cdot \frac {21}2=2100$$