AHSME Challenge Math Question Cowboy A cowboy is $4$ miles south of a stream which flows due east. He is also $8$ miles west and $7$ miles north of his cabin. He wishes to water his horse at the stream and return home. The shortest distance (in miles) he can travel and accomplish this is:
a. $4 + \sqrt{185}$
b. $16  $
c. $17  $
d. $18  $
e. $\sqrt{32} + \sqrt{137}$
The correct answer is C, however I did not get that. I got my incorrect answer (A) by adding $7$ and $4$. I used the Pythagorean Theorem to find the hypotenuse length of an $8\times 11$ triangle which is $\sqrt{185}$.
Could you please explain how to get it? Thank you.
 A: WLOG the cowboy is at $(0,0)$. The stream is at $y=4$ and his cabin is at $(8,-7)$. Note the minimum distance to the stream and then to his cabin is the same as going directly to $(8,15)$, which has length $17$.

A: Your answer proposes the following trajectory for the cowboy:

But that's not optimal: it's better for the cowboy to be moving east the whole time, not just after getting water.
To see the optimal path, imagine the cowboy's evil twin, who is 8 miles further north of the cowboy: his position is the reflection of the cowboy's position through the edge of the stream. Also, the evil twin can fly.

Whatever path the cowboy takes, the evil twin can imitate, by first following the reflection of that path to the bank of the river, then following the cowboy back to his cabin. Conversely, however the evil twin gets to the cabin, the cowboy can imitate the evil twin's path, reflecting its first segment.
The evil twin's best path is the straight line from his location to the cabin. So the cowboy's best path is the red trajectory shown for him in the image above. Its length is $\sqrt{8^2 + (4 + 4 + 7)^2} = 17$.
A: Worth mentioning is the 'honest' way to do the problem: find the value $x$, the east distance the cowboy travels, such that the total distance $T(x)=\sqrt{x^2+16}+\sqrt{(8-x)^2+11^2}$ is minimized. Differentiating, we have
$$
T'(x) = \frac{x}{\sqrt{x^2+16}} +\frac{x-8}{\sqrt{x^2-16x+185}}
$$Set this equal to zero and solve for $x$:
$$
0= x\sqrt{x^2-16x+185}+(x-8)\sqrt{x^2+16}
$$
$$
(x-8)^2(x^2+16)= x^2(x^2-16x+185)
$$
$$
105 x^2+256x-1024=0
$$Solving this gives $x=-32/7$, which can obviously be discarded, and $x=32/15$; this value gives $D_{\text{to stream}}=68/15$ and $D_{\text{to cabin}}=187/15$, for a total distance of $17$.
