5. As shown in Figure 1, on the sides $BC$ and $CA$ of the equilateral $\triangle ABC$, there are points $E$ and $F$ respectively, and it satisfies
$$
\begin{array}{l}
B E=C F=a, E C=F A \\
=b(a>b) . \text { When } B F \text { bisects }
\end{array}
$$

$A E$, then the value of $\frac{a}{b}$ is ( ).
(A) $\frac{\sqrt{5}-1}{2}$
(B) $\frac{\sqrt{5}-2}{2}$
(C) $\frac{\sqrt{5}+1}{2}$
(D) $\frac{\sqrt{5}+2}{2}$
5.C.

As shown in Figure 8, draw $ED \parallel BF$ intersecting $AC$ at point $D$. Clearly, $AF = FD = b$.
Therefore, $DC = a - b$.
Notice that $\frac{DC}{DF} = \frac{EC}{BE} = \frac{b}{a}$, which means $\frac{a - b}{b} = \frac{b}{a}$. Thus, $\left(\frac{a}{b}\right)^2 - \left(\frac{a}{b}\right) - 1 = 0$. Solving this, we get $\frac{a}{b} = \frac{\sqrt{5} + 1}{2}$.