2. In $\triangle A B C$, $\angle B=2 \angle C, A D$ is the angle bisector of $\angle A$, $m A B=n B D(n>m>0)$. Then $\cos C=$ $\qquad$ .
2. $\frac{n+m}{2 n}$.

As shown in Figure 4, extend $C B$ to $E$ such that $B E=A B$. In the isosceles $\triangle A B E$, we have
$$
\begin{array}{l}
\angle B E A=\angle B A E \\
=\frac{1}{2} \angle A B C=\angle C,
\end{array}
$$

which means $\triangle A E C$ is an isosceles triangle, so $A C=A E$.
Furthermore, in $\triangle A E D$,
$$
\angle E A D=\angle C+\frac{1}{2} \angle B A C=\angle A D E \text {. }
$$

Thus, $\triangle A E D$ is an isosceles triangle, and we get
$$
A E=E D=E B+B D=A B+B D=\frac{n+m}{n} A B \text {. }
$$

In the isosceles $\triangle A B E$, $\cos E=\frac{\frac{1}{2} A E}{B E}=\frac{n+m}{2 n}$.

Therefore, $\cos C=\cos E=\frac{n+m}{2 n}$.