Fermat's Principle in optics states that light travels from point $A$ (in the $x y$ -plane) in one medium to point $B$ in another medium on a path that requires minimum time. Denote the speed of light in the medium that contains point $A$ by $c_{1}$ and the speed of light in the medium that contains point $B$ by $c_{2}$. Show that the time of travel from $A$ to $B$ is a minimum when the angles $\theta_{1}$ and $\theta_{2}$, shown in FIGURE 4.8.40, satisfy Snell's law:
$$
\frac{\sin \theta_{1}}{c_{1}}=\frac{\sin \theta_{2}}{c_{2}}
$$