$18 \cdot 17$ In a convex quadrilateral $A B C D$, $A D=D C=C B=x, A C=B D$ $=A B=y$. Then the value of $\frac{x}{y}$ is
(A) $\frac{\sqrt{5}-1}{2}$.
(B) $\frac{\sqrt{5}+1}{2}$.
(C) $\frac{\sqrt{3}-1}{2}$.
(D) $\frac{\sqrt{3}+1}{2}$.
(Anhui Province, Anqing and other counties and cities Junior High School Mathematics Competition, 1990)
[Solution] It is easy to prove $\triangle D B A \cong \triangle C A B$ from the given conditions.
Furthermore, since the distances from $D$ and $C$ to $A B$ are equal, we can prove $D C \parallel A B$. By the properties of parallel lines and congruent triangles, we have
$$
\angle D A C=\angle C A B,
$$

which means $A P$ bisects $\angle D A B$.
Also, $P B=P A=A D=x$,

then $P D=y-x$.
Thus, from $\frac{P D}{P A}=\frac{A D}{A B}$ we get $\frac{y-x}{x}=\frac{x}{y}$, or $x^{2}+x y-y^{2}=0$,
or $\left(\frac{x}{y}\right)^{2}+\frac{x}{y}-1=0$.
Solving this, we get $\frac{x}{y}=\frac{\sqrt{5}-1}{2}$.
Therefore, the answer is $(A)$.