5. Given that $\alpha, \beta$ are acute angles, $\sin \alpha=x, \cos \beta=y$, $\cos (\alpha+\beta)=-\frac{3}{5}$. Then the functional relationship between $y$ and $x$ is $(\quad)$.
(A) $y=-\frac{3}{5} \sqrt{1-x^{2}}+\frac{4}{5} x\left(\frac{3}{5}<x<1\right)$
(B) $y=-\frac{3}{5} \sqrt{1-x^{2}}+\frac{4}{5} x(0<x<1)$
(C) $y=-\frac{3}{5} \sqrt{1-x^{2}}-\frac{4}{5} x\left(0<x<\frac{3}{5}\right)$
(D) $y=-\frac{3}{5} \sqrt{1-x^{2}}-\frac{4}{5} x(0<x<1)$
5. A.
$$
\begin{array}{l}
y=\cos \beta=\cos [(\alpha+\beta)-\alpha] \\
=\cos (\alpha+\beta) \cdot \cos \alpha+\sin (\alpha+\beta) \cdot \sin \alpha \\
=-\frac{3}{5} \sqrt{1-x^{2}}+\frac{4}{5} x .
\end{array}
$$

Since $y \in(0,1)$, then $0<-\frac{3}{5} \sqrt{1-x^{2}}+\frac{4}{5} x<1$.
Thus, $x \in\left(\frac{3}{5}, 1\right)$.