5. $\sqrt{5}-1$ Detailed explanation: From $\frac{\overrightarrow{P A} \cdot \overrightarrow{P C}}{|\overrightarrow{P A}|}=\frac{\overrightarrow{P B} \cdot \overrightarrow{P C}}{|\overrightarrow{P B}|} \Rightarrow \frac{\overrightarrow{P A} \cdot \overrightarrow{P C}}{|\overrightarrow{P A}||\overrightarrow{P C}|}=\frac{\overrightarrow{P B} \cdot \overrightarrow{P C}}{|\overrightarrow{P B}||\overrightarrow{P C}|}$ we get that $P C$ is the angle bisector of $\angle A P B$, and from $\overrightarrow{B I}=\overrightarrow{B A}+\lambda\left(\frac{\overrightarrow{A C}}{|\overrightarrow{A C}|}+\frac{\overrightarrow{A P}}{|\overrightarrow{A P}|}\right)(\lambda>0)$ we can deduce that $B I$ is the angle bisector of $\angle A B P$, so $I$ is the incenter of triangle $A P B$. Draw a perpendicular line from $I$ to line $A B$, with the foot of the perpendicular being $M$, then $\frac{\overrightarrow{B I} \cdot \overrightarrow{B A}}{|\overrightarrow{B A}|}=|B M|$, so $|\overrightarrow{P A}|-|\overrightarrow{P B}|=|A M|-$ $|M B|=2,|\overrightarrow{P A}-\overrightarrow{P B}|=2 \sqrt{5}=|A B|=|A M|+|M B|$, we get $|M B|=\sqrt{5}-1$.
5. Given $C$ is a point on line segment $A B$, $P$ is a point outside line $A B$, satisfying $|\overrightarrow{P A}|-|\overrightarrow{P B}|=2,|\overrightarrow{P A}-\overrightarrow{P B}|=2 \sqrt{5}$, $\frac{\overrightarrow{P A} \cdot \overrightarrow{P C}}{|\overrightarrow{P A}|}=\frac{\overrightarrow{P B} \cdot \overrightarrow{P C}}{|\overrightarrow{P B}|}, I$ is a point on $P C$, and $\overrightarrow{B I}=\overrightarrow{B A} +\lambda\left(\frac{\overrightarrow{A C}}{|\overrightarrow{A C}|}+\frac{\overrightarrow{A P}}{|\overrightarrow{A P}|}\right)(\lambda>0)$, then the value of $\frac{\overrightarrow{B I} \cdot \overrightarrow{B A}}{|\overrightarrow{B A}|}$ is $\qquad$