5. As shown in Figure 1, given $\triangle A B C$, a tangent line to the circumcircle through point $A$ intersects the extension of $B C$ at point $P, \frac{P C}{P A}=\frac{\sqrt{2}}{2}$, point $D$ is on $A C$ such that $\frac{A D}{C D}=\frac{1}{2}$, and the extension of $P D$ intersects $A B$ at point $E$. Then the value of $\frac{A E}{B E}$ is ( ).
(A) $\frac{1}{4}$
(B) $\frac{\sqrt{2}}{4}$
(C) $\frac{1}{2}$
(D) $\frac{\sqrt{2}}{2}$
5.A.

As shown in Figure 4, since $\angle P A C = \angle B$, then $\triangle P A C \backsim \triangle P B A$.
Therefore, $\frac{S_{\triangle P A C}}{S_{\triangle P B A}} = \frac{P C^{2}}{P A^{2}} = \frac{1}{2}$.
Also, $\frac{A D}{C D} = \frac{1}{2}$, then
$$
\begin{aligned}
\frac{S_{\triangle P A C}}{S_{\triangle P A}} & = \frac{3 S_{\triangle P A D}}{\frac{3}{2} S_{\triangle P B D}} \\
& = 2 \times \frac{A E}{B E} .
\end{aligned}
$$

Thus, $2 \times \frac{A E}{B E} = \frac{1}{2}, \frac{A E}{B E} = \frac{1}{4}$.