The problem is given in image below. We're given a semicircle whose diameter is $AB$ and center $O$ and we want to construct the rectangle triangle $\triangle PCD$ with $CD \parallel AB$, $C$ and $D$ on the circle.
I've managed to find one solution with the help of some calculation.
Let $$AB := 2R \text{ and } \angle BOD := d $$
then, my (long) calculations led to $$\cos (2d) = \frac{OP^2}{R^2}$$
which allowed me to find the following solution ($PQ \perp OP, PX \perp OQ, OX=OY, YZ \perp OP$ and $DZ=DB$)
I want to know if there is a simpler construction of the triangle and if there is an easy way to see that $\cos (2d) = \frac{OP^2}{R^2}$ without too many calculations



Here's a simpler construction. On line $PQ$ construct point $H$ such that $PH=\displaystyle{PQ\over\sqrt2}$. Line $CD$ is then the parallel to $AB$ through $H$. This works because: $$ \begin{align} PQ^2&=OQ^2-OP^2\\ &=OC^2-OP^2\\ &=ON^2+CN^2-OP^2\\ &=ON^2+PN^2-OP^2\\ &=2ON^2, \end{align} $$ where $N$ is the midpoint of $CD$.