# Calc I Minimization Word Problem

This problem has a picture to explain what I'm talking about:

I'm just a little confused how to set this up. I know that I need to differentiate to minimize the distance from A to B, but I get a little confused on how 4 mi/hour factors into the equation.

Any assistance on how to set this problem up would be greatly appreciated.

-

The hiking velocity is the speed at which Thelma can walk "cross-country", meaning in a straight line from $A$ to $B$; the jogging velocity is the velocity at which Thelma can travel while on the Highway (from $B$ to Sleepy Hollow).
What is the distance from $A$ to the point $B$? If we let $x$ be the distance from $C$ (the point where the old road and the Highway intersect), then we have a right triangle with sides $2$ and $x$ ($2$ is the distance from $A$ to $C$, and $x$ is the distance from $C$ to $B$). So the hypothenuse, which is the distance from $A$ to $B$, has length given by the Pythagorean theorem: $$\text{distance from }A\text{ to }B = \sqrt{4 + x^2}\text{ miles.}$$ Since she can travel this distance at $4$ miles per hour, the time it will take her to get form $A$ to $B$ will be $$\frac{\sqrt{4+x^2}}{4}\text{ hours}.$$
After she gets to $B$, she can jog all the way to Sleepy Hollow; the distance from $B$ to Sleepy Hollow is $k-x$ miles, where $x$ is the distance from $C$ to $B$, and $k$ is the distance from $C$ to Sleepy Hollow. Since she can jog at $5$ miles per hour, the time it will take her to jog this distance will be $$\frac{k-x}{5}\text{ hours.}$$
So her total time will be $$T(x) = \frac{\sqrt{4+x^2}}{4} + \frac{k-x}{5}\text{ hours.}$$ You know that $k$ satisfies $3\leq k\leq 4$. You need to minimize $T$ (note that $x$ cannot take any value greater than $k$).