9. Given that $O$ is the circumcenter of $\triangle A B C$, and $3 \overrightarrow{O A}+4 \overrightarrow{O B}+5 \overrightarrow{O C}=\overrightarrow{0}$, find the value of $\cos \angle B A C$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
Let the circumradius of $\triangle ABC$ be $r=1$. From the given, we have $3 \overrightarrow{O A}=-4 \overrightarrow{O B}-5 \overrightarrow{O C}$. Squaring both sides, we get
$$
\overrightarrow{O B} \cdot \overrightarrow{O C}=-\frac{4}{5}
$$

Similarly, we can obtain
$$
\overrightarrow{O A} \cdot \overrightarrow{O C}=-\frac{3}{5}, \overrightarrow{O A} \cdot \overrightarrow{O B}=0
$$
6 points
Thus,
$$
\overrightarrow{A B} \cdot \overrightarrow{A C}=(\overrightarrow{O B}-\overrightarrow{O A}) \cdot(\overrightarrow{O C}-\overrightarrow{O A})=\overrightarrow{O B} \cdot \overrightarrow{O C}-\overrightarrow{O A} \cdot \overrightarrow{O C}-\overrightarrow{O A} \cdot \overrightarrow{O B}+\overrightarrow{O A}^{2}=\frac{4}{5} \quad 8 \text { points }
$$

Therefore,
$$
|\overrightarrow{A B}|^{2}=(\overrightarrow{O B}-\overrightarrow{O A})^{2}=2,|\overrightarrow{A C}|^{2}=(\overrightarrow{O C}-\overrightarrow{O A})^{2}=2-2 \cdot\left(-\frac{3}{5}\right)=\frac{16}{5} \quad 12 \text { points }
$$

Thus,
$$
\cos \angle B A C=\frac{\overrightarrow{A B} \cdot \overrightarrow{A C}}{|\overrightarrow{A B}| \cdot|\overrightarrow{A C}|}=\frac{\frac{4}{5}}{\sqrt{2} \cdot \sqrt{\frac{16}{5}}}=\frac{\sqrt{10}}{10}
$$