Heron's Problem and Snell's Law

Use calculus (and a CAS if needed) to compute the value of the [math]x[/math] coordinate of the point [math]C[/math] on the [math]x[/math] axis that minimizes the time of travel along [math]A\to C\to B[/math] with [math]A=(1,3)[/math], [math]B=(4,-2)[/math], [math]v_1=4[/math], and [math]v_2=5[/math]. Enter your solution into the input box below to verify that the value of [math]\frac{\sin \theta_1}{\sin \theta_2}[/math] is as predicted by Snell's Law.