One. (20 points) As shown in Figure 6, in the right triangle $\triangle ABC$, $\angle BAC=90^{\circ}$, $AD \perp BC$ at point $D$, $P$ is the midpoint of $AD$, the extension of $BP$ intersects $AC$ at point $E$, $EF \perp BC$ at point $F$, and the extension of $FE$ intersects the circumcircle $\odot O$ of $\triangle ABC$ at point $G$. If $AE=3$, $EC=12$, find the length of segment $EG$.
As shown in Figure 10, line $F G$ intersects $\odot O$ and the extension of $B A$ at points $N$ and $M$ respectively.
Given $A D \perp B C$,
$E F \perp B C$,
we have $\frac{A P}{E M}=\frac{B P}{B E}$
$$
=\frac{P D}{E F} \text {. }
$$

Since $A P=P D$
$$
\Rightarrow E M=E F \text {. }
$$

It is easy to prove
Rt $\triangle E F C \backsim$ Rt $\triangle E A M$
$$
\begin{array}{l}
\Rightarrow \frac{E F}{E A}=\frac{E C}{E M} \Rightarrow E F^{2}=A E \cdot E C=36 \\
\Rightarrow E F=6 .
\end{array}
$$

Let $E G=x$.
By the perpendicular diameter theorem, we get $F N=F G$.
Then $E N=x+12$.
By the intersecting chords theorem, we get
$$
x(x+12)=36 \text {. }
$$

Solving for $x$ gives $x=6(\sqrt{2}-1)$.
Thus, $E G=6(\sqrt{2}-1)$.