I want to minimize the function $T(x)$.
$T(x)$ = $ \frac{\sqrt{(x - x_1)^2 + y_1^2}}{v_1} + \frac{\sqrt{(x - x_2)^2 + y_2^2}}{v_2} $
where $ x_1 , y_1, x_2, y_2, v_1, v_2$ are constants.
I differentiated $T(x)$ with respect to $x$ i.e.
$ \frac{dT}{dx} = \frac{x- x_1}{v_1 \sqrt{(x - x_1)^2 + y_1^2}} + \frac{x- x_2}{v_2 \sqrt{(x - x_2)^2 + y_2^2}} = 0$
But I was not able to find $x$ from the above equation.
The main goal is to find the minimum value of $T(x)$ $\forall x \in \Bbb R$
One possible solution from computer programming point of view would be to use a ternary search from the range $left = min(x_1,x_2)$ to $right = max(x_1, x_2)$ since the function $T(x)$ decreases and then increases from $(left,right)$ so we could determine the minima.
I think a mathematical solution would be rigorous but if someone wants to contribute then it will be very useful.