9. Let $\vec{a}, \vec{b}$ be two perpendicular planar vectors, and $|\vec{a}|=2|\vec{b}|=10$. When $0 \leqslant t \leqslant 1$, denote the maximum angle between the vectors $t \vec{a}+(1-t) \vec{b}$ and $\left(t-\frac{1}{5}\right) \vec{a}+(1-t) \vec{b}$ as $\theta$, then $\cos \theta=$ $\qquad$.
Let $A(10,0), B(0,5), \vec{a}=\overrightarrow{O A}, \vec{b}=\overrightarrow{O B}$.
Obviously, $\overrightarrow{O C}=t \vec{a}+(1-t) \vec{b} \Rightarrow A, C, B$ are collinear. Let $C(x, y)$, then $x+2 y=10$.
$\overrightarrow{O D}=\left(t-\frac{1}{5}\right) \vec{a}+(1-t) \vec{b}=\overrightarrow{O C}-\frac{1}{5} \vec{a}$
$\Rightarrow D(x-2, y)$. As shown in the figure,
Let $\angle C O B=\alpha, \angle D O B=\beta$, when $2 \leqslant x \leqslant 10$, $\theta=\alpha-\beta$; when $0 \leqslant x<2$, $\theta=\alpha+\beta$.
Thus, $\tan \alpha=\frac{x}{y}, \tan \beta=\frac{x-2}{y}, \tan \theta=\tan (\alpha-\beta)=\frac{\frac{x}{y}-\frac{x-2}{y}}{1+\frac{x}{y} \cdot \frac{x-2}{y}}=\frac{2 y}{y^{2}+(10-2 y)(8-2 y)}$
$=\frac{2 y}{5 y^{2}-36 y+80}=\frac{2}{5 y+\frac{80}{y}-36} \leqslant \frac{1}{2}$, equality holds when $y=4, x=2$.
Therefore, $\cos \theta=\frac{2}{\sqrt{1^{2}+2^{2}}}=\frac{2 \sqrt{5}}{5}$.