We're given an angle $\angle BAC$. We want to construct $D \in \overrightarrow{AB}$ and $E \in \overrightarrow{AC}$ such that $CE=DE=DB$. This is Euclidea's problem 15.4 and I have the solution but I don't understand it, here is a solution:
we construct circle $\gamma = \odot (B,\overline{AC})$ and mark point $X = \gamma \cap \overline{AB}$
we then draw line $r$, such that $X \in r \parallel AC$
we draw circle $\omega = \odot (C,\overline{CB})$ and mark point $Y = \omega \cap r$
point $D$ is in the perpendicular bissector of $YB$ and on line $AB$.
Why is that?
People who want solutions for Euclidea can check this channel


I am trying to answer the question "Why is that?" in the following manner. First of all, assuming we have the points $D,E$ on the sides $AB,AC$ with $BD=DE=EC$ we will construct $Y,X$, and show their properties match those from the construction. So if there is a solution, it must follow the prescribed receipt. Secondly, we perform the prescribed receipt (from the question and from the first point) till the end, also introducing $E$ in the obvious unique manner, and show that $BD=DE=EC$. So we have two proposition, let us state them explicitly in detail.
Proof: Denote by $a$ and by $2e$ the (measures of) angles $a=\widehat{BAC}$, and $2e=\widehat{CED}$.
Then the angles in $C,D$ in the isosceles triangle $\Delta CED$ are the complements of $e$, $\hat C=\hat D=\bar e:=90^\circ-e$. Also, $\widehat{EDA}=\widehat{CED}-\widehat{BAC}=2e-a$. So $\widehat{CDA}= \bar e+(2e-a)=90^\circ+e-a$. This is also half of the angle in $D$ in $\Delta DBY$, so the equal angles in $B,Y$ in this last triangle are each $a-e$. The angle $a=\widehat{AXY}$ is finally the sum of $\widehat{XYB}$ and $\widehat{XBY}$, so $$ \widehat{XYD}= a- 2(a-e)=2e-a=\widehat{EDA}\ . $$ To conclude now that $EA=XD$ the simplest way is to use the sine theorem for $\Delta EAD$, and $\Delta DXY$: $$ \frac{EA}{ED}= \frac{\sin (2e-a)}{\sin a} = \frac{\sin (2e-a)}{\sin (180^\circ-a)} = \frac{XD}{DY}\ . $$ Now we use $ED=DB=DY$ to get $EA=XD$, and finally $AC=AE+EC=XD+DB=XB$.
$\square$
The points $X,Y$ correspond to those from the question.
Conversely, we show that the construction from the question is working. (At each point, only properties of the construction may be used as arguments.) Here is explicitly the complete statement.
Proof: The picture is as follows:
Again, we denote by $a$ the angle $\widehat{BAC}$, by $2e$ the angle $\widehat{CED}$. Then the angles in $C,D$ in $\Delta CED$ are $\bar e$, $2e$ is exterior to $\Delta AED$ in $E$, so $\widehat{EDA}=2e-a$, this leads to the value of the half of $\hat D$ in the isosceles triangle $\Delta DBY$, so the angles in $B,Y$ are each $a-e$. Finally, since $a=\widehat{BAC}=\widehat{AXY}$, we compute $\widehat{XYD}=2e-a$. The sine theorem in $\Delta AED$ and $\Delta XDY$ gives now the needed transition from proportions on $AB$ to proportions on $AC$: $$ \frac {XD}{DB} = \frac {XD}{DY} = \frac {\sin (2e-a)}{\sin(180^\circ -a)} = \frac {\sin (2e-a)}{\sin a} = \frac {AE}{ED} = \frac {AE}{EC}\ . $$ From here, adding one on each side, $$ \frac {XB}{DB} = \frac {XD}{DB} +1= \frac {AE}{EC} +1= \frac {AC}{EC}\ . $$ But by construction, $XB=AC$, so $DB=EC$.
$\square$