# The distance between two points given distances that bees meet in two different time intervals

The original question, actually from a Intro Comp Sci course.

Two bees, named romeo and juliet, live in different hives but have met and fallen in love. On a windless spring morning, they simultaneously leave their respective hives to visit each other. Their routes meet at a point 50 meters from the closest hive, but they fail to see each other and continue on to their destinations. At their destinations, they spend the same amount of time to discover that the other is not home and begin their return trips. On their return trips, they meet at a point that is 20 meters from the closest hive. This time they see each other and have a picnic lunch before returning home. How far apart are the two hives?

-

Let the slower bee is called $A$, while the faster bee is called $B$. Let the whole distance is $X$. And let they first meet after time $t$.
This means that for time $t$ both bees together travel distance $X$. It's given $A$ has traveled $50m$ for time $t$. Both bees cover distance of $2X$ from the time they meet for the first time to the time they meet for the second time. This means that $A$ traveled $100m$ and it's also given that $A$ is at distance $20m$ from the other hive. Thus $100 = (X-50) + 20$.
Thus $X=130$.
$A$ can't be $20m$ from the same hive. Don't forget $A$ is the slower. This means he he travels $X-50$ slower than $B$ and $50 < X-50$ for the same reason. Thus $B$ arrives at the hive before A. Therefore it leaves it before $A$ leave the other hive. Thus when they meet again $B$ is again even further away from the first hive than $A$ is from the second. – Petar Ivanov Nov 23 '11 at 6:59
Also the fact that they rest at the hives is irrelevent, because they rest the same amount of time. If this amount is $s$ then they meet for the second time after time $2t+s$ after the first meeting point. – Petar Ivanov Nov 23 '11 at 7:02