5. As shown in Figure 1, in $\square A B C D$, $A B=3, B C=7$, $B E$ is perpendicular to the angle bisector $A E$ of $\angle B A D$ at point $E$, $F$ is the midpoint of $C D$, and $B D$ intersects $E F$ at point $G$. Then the value of $E G: G F$ is ( ).
(A) $3: 4$
(B) $3: 7$
(C) $1: 2$
(D) $4: 7$
5. D.

As shown in Figure 6, extend $B E$ to intersect $A D$ at point $H$. It is easy to see that
$$
\begin{array}{c}
\triangle A H E \cong \triangle A B E \\
\Rightarrow E H=B E, \\
A H=A B=3 .
\end{array}
$$

Then $H D=A D-A H$
$$
=7-3=4 \text {. }
$$

Thus, $E F$ is the midline of trapezoid $H B C D$.
Therefore, $E G$ and $G F$ are the midlines of $\triangle B H D$ and $\triangle B C D$, respectively.
Hence $E G: G F=H D: B C=4: 7$.