Calculus Dog--Run or Swim?

Topic:
Calculus
A frisbee is thrown from the shore of a lake from point C out into the water and lands at point A. A dog runs from point C along the shore to point B and then jumps into the water and swims directly from B to A to retrieve the frisbee. The dog wants to enter the water at a point that minimizes its total time (time on the shore plus time in the water) to retrieve the frisbee. You can move the point B to map out the total time (in red) that the dog needs to reach the frisbee and see when it is the smallest value. You can change the running speed and swimming speed of the dog using the green and blue sliders. You can also move point A, where the frisbee lands in the water.