Example 5. As shown in the figure, in $\triangle ABC$, $AD \perp BC$ at $D$, $P$ is the midpoint of $AD$, $BP$ intersects $AC$ at $E$, $EF \perp BC$ at $F$. Given $AE=3$, $EC=$ 12. Find the length of $EF$.
Analysis: Consider $\triangle A B C$ as its machine triangle, given that $E$, $P$ are the fixed ratio points of $A C, A D$ respectively, hence from (*) we get $\left(1+\frac{C D}{D B}\right) \cdot \frac{3}{12}=1$, i.e., $\frac{C D}{D B}=3$.

From the projection theorem, we can find $B D=\frac{5}{2} \sqrt{3}, D C$ $=\frac{15}{2} \sqrt{3}$, thus $A D=\frac{15}{2}$.
By $\triangle C A D C \sim \triangle C E F$ we get $E F=6$.
Using the above basic figure and (*) formula, prove the following.