In the figure below, $A B=15, B D=18, A F=15, D F=12, B E=24$, and $C F=17$. Find $B G: F G$
Solution: Our goal is to find the lengths $B G$ and $F G$. There are several ways to go about doing this, but we will show only one here. We will make several uses of Stewart's theorem, which can be proved using the law of cosines twice. By Stewart's theorem on triangle $A B D$ and line $B F$, $15^{2} \cdot 12+18^{2} \cdot 15=B F^{2} \cdot 27+15 \cdot 12 \cdot 27$, so $B F=10$ and $E F=14$. By Stewart's theorem on triangle $A B E$ and line $A F, A E^{2} \cdot 10+15^{2} \cdot 14=15^{2} \cdot 24+14 \cdot 10 \cdot 24$, so $A E=\sqrt{561}$. By Stewart's theorem on triangle $A E D$ and line $E F, E D^{2} \cdot 15+561 \cdot 12=14^{2} \cdot 27+12 \cdot 15 \cdot 27$, so $E D=2 \sqrt{57}$. By Stewart's theorem on triangle $C F E$ and line $F D, 14^{2} \cdot C D+17^{2} \cdot 2 \sqrt{57}=$ $12^{2} \cdot(C D+2 \sqrt{57})+2 \sqrt{57} \cdot C D \cdot(C D+2 \sqrt{57})$, so $C D=\sqrt{57}$ and $C E=3 \sqrt{57}$. Note that $D G=18-B G$ and apply Menelaus' theorem to triangle $B E D$ and the line through $C, G$, and $F$ to get $3 \cdot \frac{18-B G}{B G} \cdot \frac{10}{14}=1$, so $B G=\frac{135}{11}$. Similarly $C G=17-F G$, so applying Menelaus' theorem to triangle $C F E$ and the line through $B, G$, and $D$ we get $\frac{24}{10} \cdot \frac{F G}{17-F G} \cdot \frac{1}{2}=1$, so $F G=\frac{85}{11}$. Therefore $B G: F G=\mathbf{2 7}: 17$