Given a fixed triangle $\triangle A B C$ and a point $P$, find the maximum value of

$$
\frac{A B^{2}+B C^{2}+C A^{2}}{P A^{2}+P B^{2}+P C^{2}}
$$
We use the following lemma.

Lemma. Given $a, b, c, p \in \mathbb{R}$ such that not all of $a, b, c$ are equal,

$$
(a-b)^{2}+(b-c)^{2}+(c-a)^{2} \leq 3\left((p-a)^{2}+(p-b)^{2}+(p-c)^{2}\right)
$$

with equality if and only if $p=(a+b+c) / 3$.

Proof. For fixed $a, b, c$, the right hand side is a quadratic in $p$, namely

$$
\begin{aligned}
3\left((p-a)^{2}+(p-b)^{2}+(p-c)^{2}\right) & =3\left(\left(p^{2}-2 a p+a^{2}\right)+\left(p^{2}-2 b p+b^{2}\right)+\left(p^{2}-2 c p+c^{2}\right)\right) \\
& =9 p^{2}-6(a+b+c) p+3\left(a^{2}+b^{2}+c^{2}\right) .
\end{aligned}
$$

and is thus minimized at $-\frac{-6(a+b+c)}{2 \cdot 9}=(a+b+c) / 3$. By plugging $p=(a+b+c) / 3$ into the original equation, we observe equality, as desired.

Using Cartesian coordinates, let $A=\left(a_{x}, a_{y}\right), B=\left(b_{x}, b_{y}\right), C=\left(c_{x}, c_{y}\right)$, and $P=$ $\left(p_{x}, p_{y}\right)$. By the Pythagorean theorem,

$$
\begin{gathered}
A B^{2}+B C^{2}+C A^{2}=\left[\left(a_{x}-b_{x}\right)^{2}+\left(a_{y}-b_{y}\right)^{2}\right]+\left[\left(b_{x}-c_{x}\right)^{2}+\left(b_{y}-c_{y}\right)^{2}\right] \\
+\left[\left(c_{x}-a_{x}\right)^{2}+\left(c_{y}-a_{y}\right)^{2}\right] \\
=\left[\left(a_{x}-b_{x}\right)^{2}+\left(b_{x}-c_{x}\right)^{2}+\left(c_{x}-a_{x}\right)^{2}\right] \\
+\left[\left(a_{y}-b_{y}\right)^{2}+\left(b_{y}-c_{y}\right)^{2}+\left(c_{y}-a_{y}\right)^{2}\right]
\end{gathered}
$$

so by the above,

$$
\begin{aligned}
A B^{2}+B C^{2}+C A^{2} \leq 3[ & \left.\left(p_{x}-a_{x}\right)^{2}+\left(p_{x}-b_{x}\right)^{2}+\left(p_{x}-c_{x}\right)^{2}\right] \\
& +3\left[\left(p_{y}-a_{y}\right)^{2}+\left(p_{y}-b_{y}\right)^{2}+\left(p_{y}-c_{y}\right)^{2}\right] \\
= & 3\left[\left(p_{x}-a_{x}\right)^{2}+\left(p_{y}-a_{y}\right)^{2}\right]+3\left[\left(p_{x}-b_{x}\right)^{2}+\left(p_{y}-b_{y}\right)^{2}\right] \\
& +3\left[\left(p_{x}-c_{x}\right)^{2}+\left(p_{y}-c_{y}\right)^{2}\right] \\
= & 3\left(P A^{2}+P B^{2}+P C^{2}\right) .
\end{aligned}
$$

This gives

$$
\frac{A B^{2}+B C^{2}+C A^{2}}{P A^{2}+P B^{2}+P C^{2}} \leq 3,
$$

with equality at

$$
P=\left(\frac{a_{x}+b_{x}+c_{x}}{3}, \frac{a_{y}+b_{y}+c_{y}}{3}\right),
$$

the centroid of $\triangle A B C$.