9. As shown in the figure, in the right triangle $A B C$, $\angle A C B=\frac{\pi}{2}, A C=B C=2$, point $P$ is a point on the hypotenuse $A B$, and $B P=2 P A$, then $\overrightarrow{C P} \cdot \overrightarrow{C A}+\overrightarrow{C P} \cdot \overrightarrow{C B}=$ $\qquad$ .
Answer 4.
Solution 1: Since
$$
\overrightarrow{C P}=\overrightarrow{C A}+\overrightarrow{A P}=\overrightarrow{C A}+\frac{1}{3} \overrightarrow{A B}=\overrightarrow{C A}+\frac{1}{3}(\overrightarrow{A C}+\overrightarrow{C B})=\frac{2}{3} \overrightarrow{C A}+\frac{1}{3} \overrightarrow{C B}
$$

Therefore,
$$
\overrightarrow{C P} \cdot \overrightarrow{C A}+\overrightarrow{C P} \cdot \overrightarrow{C B}=\frac{2}{3} \overrightarrow{C A}^{2}+\frac{1}{3} \overrightarrow{C B}^{2}=\frac{8}{3}+\frac{4}{3}=4
$$

Solution 2: Taking point $C$ as the origin, $C A$ and $C B$ as the $x$-axis and $y$-axis respectively to establish a Cartesian coordinate system, then $A(2,0), B(0,2), P\left(\frac{4}{3}, \frac{2}{3}\right)$, we have $\overrightarrow{C A}=(2,0), \overrightarrow{C B}=(0,2), \overrightarrow{C P}=\left(\frac{4}{3}, \frac{2}{3}\right)$, so $\overrightarrow{C P} \cdot \overrightarrow{C A}+\overrightarrow{C P} \cdot \overrightarrow{C B}=\frac{8}{3}+\frac{4}{3}=4$.