TITLE: A Straightforward optimization problem, but without calculus
QUESTION [6 upvotes]: I am helping a middle schooler out with the following Art of Problem Solving competition problem:
An ant travels from the point $A (0,-63)$ to the point $B (0,74)$ as follows. It first crawls straight to $(x,0)$ with $x \ge 0$, moving at a constant speed of $\sqrt{2}$ units per second. It is then instantly teleported to the point $(x,x)$. Finally, it heads directly to $B$ at 2 units per second. What value of $x$ should the ant choose to minimize the time it takes to travel from $A$ to $B$?
A straightforward but somewhat tedious solution involves using calculus to optimize the time taken as a function of x (with this method we get $\approx 23.3$). However, the student I am helping has not been introduced to calculus, and I was beating my head against a wall trying to find a clever way to solve this with simpler methods like algebra with quadratics or geometry. For instance, The function of x which represents the time of the ants travel is:
$$T = \frac{\sqrt{x^2 + 63^2}}{\sqrt{2}} + \frac{\sqrt{x^2 + (74-x)^2}}{2}$$
I thought that, instead of minimizing $T$ w.r.t $x$, I could minimize $T^2$
, which I would then be able to algebraically massage into the form of a quadratic equation. Simple knowledge of the properties of these equations would allow for a location of the minimum. This approach stalled out due to the cross term that results from the RHS. Any help would be appreciated

REPLY [6 votes]: This question can be solved 'in a flash' when looked at in the right way.
If you look at the second term in your expression for time, you can simplify it to $$\frac{\sqrt{(x-37)^2+37^2}}{\sqrt2}.$$
We have now, in effect, made it a route with two legs travelled at the same speed, $\sqrt2$.
Furthermore, you will be able to draw this as a route travelling from $(0,0)$ to $(37,100)$  via a point at $(x,63)$.
For a straight line route make $x/37=63/100$ and the problem is solved.