Example 4 In $\triangle ABC$, $AB=12, AC=16$, $M$ is the midpoint of $BC$, $E, F$ are on $AB, AC$ respectively, $EF$ intersects $AM$ at $G$, and $AE=2AF$. Find: the ratio $\frac{EG}{GF}$.
(29th IMO Preliminary Problem)
Proof: Let $A F=a, A E=2 a$, then
$$
\begin{array}{l}
\frac{A F}{A C}=\frac{a}{16}, \\
\frac{A E}{A \bar{B}}=\frac{2 a}{12}=\frac{a}{6} .
\end{array}
$$

Transform $\triangle A B C$ from Figure 7 to the triangle shown in Figure 8. Let $B(5,0), C(0, 16)$, then $E(a, 0), F(9, a), M(3,8)$.
The equation of $A M$ is:
$$
y=\frac{8}{3} x \text {. }
$$
The equation of $E F$ is:
$$
x+y=a \text {. }
$$

Solving these equations simultaneously, we get
$$
G\left(\frac{3 a}{11}, \frac{8 a}{11}\right) \text {. }
$$

Therefore,
$$
\frac{\dot{E} G}{G F}=\frac{y_{G}}{y_{F}-y_{G}}=\frac{\frac{8}{11}}{1-\frac{8}{11}}=\frac{8}{3}
$$

is the desired result.