5. Given that $D$ is a point on the hypotenuse $AB$ of right $\triangle ABC$, $DE \perp BC$ at point $E$, and $BE = AC$. If $BD = 1$, $DE + BC = 2$, then $\tan B = (\quad)$.
(A) $\frac{\sqrt{3}}{3}$
(B) 1
(C) $\sqrt{3}$
(D) None of the above
5. A.

As shown in Figure 7, let $D E=x$.
Then $B C=2-x$,
$$
B E=A C=\sqrt{1-x^{2}} \text {. }
$$

By the given condition,
$$
\frac{D E}{A C}=\frac{B E}{B C} \text {, }
$$

which means $\frac{x}{\sqrt{1-x^{2}}}=\frac{\sqrt{1-x^{2}}}{2-x}$.
Solving this, we get $x=\frac{1}{2}$. Therefore, $D E=\frac{1}{2} B D \Rightarrow \angle B=30^{\circ}$ $\Rightarrow \tan B=\frac{\sqrt{3}}{3}$.