5. Given $\sin 2 \alpha=m, \cos 2 \alpha=n, m, n \in$ $(0,1)$. Among the following four values:
(1) $\frac{1+m}{n}$,
(2) $\frac{n}{1-m}$,
(3) $\frac{n+m+1}{n-m+1}$,
(4) $\frac{m-n+1}{m+n-1}$,

which can be the value of $\tan \left(\alpha+\frac{\pi}{4}\right)$? ( )
(A) 1
(B) 2
(C) 3
(D) 4
5.D.
$$
\begin{array}{l}
\tan \left(\alpha+\frac{\pi}{4}\right)=\frac{1+\tan \alpha}{1-\tan \alpha}=\frac{\cos \alpha+\sin \alpha}{\cos \alpha-\sin \alpha} \\
=\frac{(\cos \alpha+\sin \alpha)^{2}}{\cos ^{2} \alpha-\sin ^{2} \alpha}=\frac{1+\sin 2 \alpha}{\cos 2 \alpha}=\frac{1+m}{n}, \\
\tan \left(\alpha+\frac{\pi}{4}\right)=\frac{\cos ^{2} \alpha-\sin ^{2} \alpha}{(\cos \alpha-\sin \alpha)^{2}} \\
=\frac{\cos 2 \alpha}{1-\sin 2 \alpha}=\frac{n}{1-m} .
\end{array}
$$

From the properties of proportions, we get
$$
\begin{array}{l}
\frac{1+m}{n}=\frac{n}{1-m}=\frac{m+n+1}{n-m+1}, \\
\frac{1+m}{n}=\frac{n}{1-m}=\frac{m-n+1}{m+n-1} .
\end{array}
$$