# Problem of the Week Problem E and Solution Coffee Run

## Problem

On Saturday morning at $$8$$ a.m., Ayla and Hamza left their house. Ayla walked west towards the beach, and Hamza rode his e-scooter northeast to his favourite coffee shop, then headed to catch up with Ayla. Ayla walked at a constant speed of $$4$$ km/h and Hamza rode his e-scooter at a constant speed of $$20$$ km/h. If Hamza caught up with Ayla exactly $$45$$ minutes after they left their house, what is the maximum possible distance between their house and the coffee shop?

## Solution

To find the maximum possible distance between their house and the coffee shop, we will assume that Hamza traveled in a straight line from his house to the coffee shop, and also from the coffee shop to catch up with Ayla. We will also assume that Hamza spent no time at the coffee shop. In reality these assumptions are unlikely, however they are necessary to determine the maximum possible distance.

Solution 1

We know that the total time is $$45$$ minutes, or $$\frac{3}{4}$$ of an hour, and in that time Ayla walked $$\frac{3}{4} \times 4 = 3$$ km.

Let $$t$$ represent the time, in hours, that it took Hamza to travel to the coffee shop. Then, he took $$\left(\frac{3}{4}-t\right)$$ hours to travel from the coffee shop to meet up with Ayla. The distance between their house and the coffee shop is then $$20t$$ km, and the distance between the coffee shop and the point where Hamza met up with Ayla is $$20\left(\frac{3}{4}-t\right)=(15-20t)$$ km.

On the diagram, $$H$$ represents their home, $$C$$ represents the coffee shop, and $$A$$ represents the point where Hamza met up with Ayla.

We can determine that $$\angle CHA=180^\circ-45^\circ=135^\circ$$. So $$CH = 20t$$ km, $$AH = 3$$ km, and $$AC = (15-20t)$$ km. If we let $$d=20t$$, we can simplify $$CH$$ to $$d$$ and $$AC$$ to $$15-d$$.

Using the cosine law, \begin{aligned} AC^2 &= AH^2 + CH^2 - 2(AH)(CH)\cos{(\angle CHA)}\\ (15-d)^2 &= 3^2 + d^2 - 2(3)(d)\cos{135^{\circ}}\\ 225 - 30d + d^2 &= 9 + d^2 -6d\left(-\frac{1}{\sqrt{2}}\right)\\ 216 &= \frac{6d}{\sqrt{2}} + 30d\\ d &= 216 \div \left(\frac{6}{\sqrt{2}} + 30\right) \approx 6.3~\text{km} \end{aligned}

Therefore, the maximum possible distance between their house and the coffee shop is $$216 \div \left(\frac{6}{\sqrt{2}} + 30\right) \approx 6.3$$ km.

Solution 2

As in Solution 1, we know that the total time is $$45$$ minutes, or $$\frac{3}{4}$$ of an hour, and in that time Ayla walked $$\frac{3}{4} \times 4 = 3$$ km. We will describe the positions of Ayla and Hamza in terms of points in the coordinate plane. Let the point $$H(0,0)$$ represent their home. Then Ayla walked along the negative $$x$$-axis, and the point at which she met up with Hamza is $$A(-3,0)$$.

Let $$t$$ represent the time, in hours, that it took Hamza to travel to the coffee shop, and let $$C$$ represent the coffee shop. Then the length of $$CH$$ is $$20t$$ km. To determine the coordinates of $$C$$, we will draw a vertical line from $$C$$ that meets the $$x$$-axis at point $$D$$.

Since $$\angle CHD = 45^{\circ}$$, it follows that $$\triangle CDH$$ is an isosceles right-angled triangle. \begin{aligned} \sin{45^{\circ}} &= \frac{CD}{20t}\\ \frac{1}{\sqrt{2}} &= \frac{CD}{20t}\\ CD &= \frac{20t}{\sqrt{2}} \times \frac{\sqrt{2}}{\sqrt{2}}\\ &= \frac{20\sqrt{2}t}{2} = 10\sqrt{2}t \end{aligned}

Since $$\triangle CDH$$ is an isosceles right-angled triangle, $$HD = 10\sqrt{2}t$$. Thus, the coordinates of $$C$$ are $$(10\sqrt{2}t,10\sqrt{2}t)$$.

The distance between $$A$$ and $$C$$, $$d_{AC}$$, can then be calculated. \begin{aligned} (d_{AC})^2 &= (10\sqrt{2}t - (-3))^2 + (10\sqrt{2}t - 0)^2\\ &= 100(2)t^2 + 60\sqrt{2}t + 9 + 100(2)t^2\\ &= 400t^2 + 60\sqrt{2}t + 9\\ d_{AC} &= \sqrt{400t^2 + 60\sqrt{2}t + 9} \end{aligned}

Since Hamza traveled at $$20$$ km/h, the time it took him to travel this distance was $$\frac{\sqrt{400t^2 + 60\sqrt{2}t + 9}}{20}$$ hours. It took Hamza $$\frac{3}{4}$$ of an hour to travel from $$H$$ to $$C$$ and then from $$C$$ to $$A$$. Thus, \begin{aligned} t + \frac{\sqrt{400t^2 + 60\sqrt{2}t + 9}}{20} &= \frac{3}{4}\\ 20t + \sqrt{400t^2 + 60\sqrt{2}t + 9} &= 15\\ \sqrt{400t^2 + 60\sqrt{2}t + 9} &= 15 - 20t\\ 400t^2 + 60\sqrt{2}t + 9 &= (15 - 20t)^2\\ 400t^2 + 60\sqrt{2}t + 9 &= 225 - 600t + 400t^2\\ 600t + 60\sqrt{2}t &= 216\\ t &= \frac{216}{600 + 60\sqrt{2}} \text{ hours} \end{aligned} It follows that $$HC=20t = 20\left(\frac{216}{600 + 60\sqrt{2}}\right) = \frac{216}{30 + 3\sqrt{2}}\approx 6.3$$ km. Therefore, the maximum possible distance between their house and the coffee shop is $$\frac{216}{30 + 3\sqrt{2}}\approx 6.3$$ km.