2. As shown in Figure 1, let $A D$, $B E$, and $C F$ be the three altitudes of $\triangle A B C$. If $A B=6, B C=$ $5, E F=3$, then the length of line segment $B E$ is ( ).
(A) $\frac{18}{5}$
(B) 4
(C) $\frac{21}{5}$
(D) $\frac{24}{5}$
2.D.

Since $A D, B E, C F$ are the three altitudes of $\triangle A B C$, it is easy to see that $B, C, E, F$ are concyclic.
Thus, $\triangle A E F \backsim \triangle A B C$.
Therefore, $\frac{A F}{A C}=\frac{E F}{B C}=\frac{3}{5}$, which means $\cos \angle B A C=\frac{3}{5}$.
Hence, $\sin \angle B A C=\frac{4}{5}$.
In the right triangle $\triangle A B E$,
$$
B E=A B \sin \angle B A C=6 \times \frac{4}{5}=\frac{24}{5} \text {. }
$$