5. As shown in Figure 2, in $\triangle A B C$, $A B=8, B C=7$, $A C=6$, extend side $B C$ to point $P$, such that $\triangle P A B$ is similar to $\triangle P C A$. Then the length of $P C$ is ( ).
(A) 7
(B) 8
(C) 9
(D) 10
5. C.

From the problem, we know it can only be $\triangle P A B \backsim \triangle P C A$. Therefore, we have $\frac{P A}{P C}=\frac{P B}{P A}=\frac{A B}{A C}=\frac{8}{6}=\frac{4}{3}$.
Thus, $P B=\frac{4}{3} P A, P B=P C+B C=P C+7$, $P A=\frac{4}{3} P C$.
Also, $P A^{2}=P B \cdot P C \Rightarrow\left(\frac{4}{3} P C\right)^{2}=(P C+7) P C$ $\Rightarrow \frac{16}{9} P C=P C+7 \Rightarrow P C=9$.