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$?
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
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$?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
23.31
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$?
train