pull down to refresh

You're standing at point A on the border of a rectangular area of size 300x50m. Within the rectangular area (red), you can move with speed 5 km/h. Outside of it, your speed is 10 km/h. What's the fastest way you can reach point B?
I think the answer is to walk horizontally along the edge of the rectangle for 71.13m, then walk in a straight line to point B.
Letting w = 100m (the horizontal distance from A to B) and let h = 50m (the vertical distance). Let x be the number of meters to walk horizontally before going in a straight line. The total time is:
\frac{x}{10\text{km/h}} + \frac{\sqrt{(w-x)^2 + h^2}}{5\text{km/h}}
You can use calculus to find the optimal value of x = w - h/\sqrt{3}
reply
reply
I get 0.36 \times x + 0.72 \times \sqrt{2500+(100-x)^2} for x = 100 - \frac{50}{\sqrt{3}} \approx 71.132487 is \approx 67.1769s.
reply
I wonder why our answers are off by 0.04
reply