Example 1 In $\triangle A B C$, the sides opposite to $\angle A, \angle B, \angle C$ are $a, b, c$ respectively. If $c=10, \frac{\cos A}{\cos B}=\frac{b}{a}=$ $\frac{4}{3}, P$ is a moving point on the incircle of $\triangle A B C$, and $d$ is the sum of the squares of the distances from $P$ to the vertices $A, B, C$. Then $d_{\text {min }}+d_{\text {max }}$ $=$ $\qquad$
(Sixth Henan Province High School Mathematics League)
Solution: In $\triangle ABC$, from $\frac{\cos A}{\cos B}=\frac{\sin B}{\sin A}$ we can get
$$
\sin 2A=\sin 2B.
$$

Therefore, $\angle A+\angle B=\frac{\pi}{2}$, which means $\angle C=\frac{\pi}{2}$.
$$
\text{Given } \frac{b}{a}=\frac{4}{3}, c=10,
$$

it is easy to find $b=8, a=6$, and the radius of the inscribed circle $r=2$.
As shown in Figure 1, establish a Cartesian coordinate system, let the moving point $P(x, y)$, clearly $(x-2)^{2}+(y-2)^{2}=4$. Then
$$
\begin{array}{l}
d=x^{2}+(y-8)^{2}+(x-6)^{2}+y^{2}+x^{2}+y^{2} \\
=3 x^{2}+3 y^{2}-12 x-16 y+100 \\
=3\left[(x-2)^{2}+(y-2)^{2}\right]+76-4 y \\
=88-4 y.
\end{array}
$$

Since $0 \leqslant y \leqslant 4$, by the properties of linear functions, $f(y)=88-4y$ is monotonically decreasing on $[0,4]$. Therefore,
$$
d_{\text{min}}=f(4), d_{\text{max}}=f(0).
$$

Thus, $d_{\text{min}}+d_{\text{max}}=f(4)+f(0)$
$$
=(88-16)+(88-0)=160.
$$