5. 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$
5. 160.

From the given information, we have $\angle C=90^{\circ}, a=$ $6, b=8, c=10$, and the inradius $r$ $=2$. Establish a rectangular coordinate system as shown, and let $P(x, y)$. Clearly, $(x-2)^{2}+(y-$ $2)^{2}=4$. Therefore, we have
$$
\begin{aligned}
d^{2} & =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-2 y \\
& =88-4 y .
\end{aligned}
$$
$\because 0 \leqslant y \leqslant 4$, and $f(y)=88-4 y$ is monotonically decreasing on $[0,4]$,
$$
\begin{array}{l}
\therefore d_{\min }=f(4)=72, d_{\max }=f(0)=88 . \\
\therefore d_{\min }+d_{\max}=160 .
\end{array}
$$