9. In $\triangle A B C$, $B C=a, C A=b, A B=c$. If $b$ is the geometric mean of $a$ and $c$, and $\sin A$ is the arithmetic mean of $\sin (B-A)$ and $\sin C$, find the value of $\cos B$.
$$
\begin{array}{l}
2 \sin A=\sin (B-A)+\sin C=\sin (B-A)+\sin (B+A)=2 \sin B \cos A \\
\Rightarrow a=b \cos A=b \cdot \frac{b^{2}+c^{2}-a^{2}}{2 b c}=\frac{b^{2}+c^{2}-a^{2}}{2 c} \Rightarrow b^{2}+c^{2}-a^{2}=2 a c=2 b^{2} \\
\Rightarrow c^{2}=a^{2}+b^{2} \Rightarrow C=90^{\circ} \Rightarrow \cos B=\sin A=\frac{a}{c},
\end{array}
$$

Thus $b^{2}=c^{2}-a^{2}=a c \Rightarrow\left(\frac{a}{c}\right)^{2}+\frac{a}{c}-1=0 \Rightarrow \frac{a}{c}=\frac{-1 \pm \sqrt{5}}{2}$ (negative value is discarded). Therefore, $\cos B=\sin A=\frac{a}{c}=\frac{\sqrt{5}-1}{2}$.