Without loss of generality, assume that $OP = 1.$  Let $OA = x$ and $OB = 3x.$  Let $\alpha = \angle OPA$ and $\beta = \angle OPB,$ so $\tan \alpha = x$ and $\tan \beta = 3x,$ so from the angle subtraction formula,
\begin{align*}
\tan \angle APB &= \tan (\angle OPB - \angle OPA) \\
&= \tan (\beta - \alpha) \\
&= \frac{\tan \beta - \tan \alpha}{1 + \tan \alpha \tan \beta} \\
&= \frac{2x}{1 + 3x^2}.
\end{align*}We want to maximize this expression.  Maximizing this expression is equivalent to minimizing $\frac{1 + 3x^2}{2x}.$  By AM-GM,
\[\frac{1 + 3x^2}{2x} \ge \frac{2 \sqrt{1 \cdot 3x^2}}{2x} = \frac{2x \sqrt{3}}{2x} = \sqrt{3},\]so
\[\tan \angle APB \le \frac{1}{\sqrt{3}},\]which means $\angle APB \le 30^\circ.$  Equality occurs when $x = \frac{1}{\sqrt{3}},$ so the maximum of $\angle APB$ is $\boxed{30^\circ}.$
Question:
Two runners, $A$ and $B,$ start at a point $O$ on a linear track, and start running in the same direction.  Runner $B$ runs three times as fast as runner $A.$  An observer stands at point $P$ so that $\overline{OP}$ is perpendicular to the track.  Find the maximum of $\angle APB,$ in degrees.

[asy]
unitsize(2 cm);

pair A, B, O, P;

A = (0.4,0);
B = (1.2,0);
O = (0,0);
P = (0,1);

draw((-0.5,0)--(2,0));
draw(O--P);
draw(P--A);
draw(P--B);

label("$A$", A, S);
label("$B$", B, S);
label("$O$", O, S);
label("$P$", P, N);
[/asy]
Answer:
Let's think step by step.

user
30^\circ
Two runners, $A$ and $B,$ start at a point $O$ on a linear track, and start running in the same direction.  Runner $B$ runs three times as fast as runner $A.$  An observer stands at point $P$ so that $\overline{OP}$ is perpendicular to the track.  Find the maximum of $\angle APB,$ in degrees.

[asy]
unitsize(2 cm);

pair A, B, O, P;

A = (0.4,0);
B = (1.2,0);
O = (0,0);
P = (0,1);

draw((-0.5,0)--(2,0));
draw(O--P);
draw(P--A);
draw(P--B);

label("$A$", A, S);
label("$B$", B, S);
label("$O$", O, S);
label("$P$", P, N);
[/asy]
test