Right angled triangle inscribed in a regular pentagon; find angle $ABCDE~$ is a regular pentagon. Find $x$.

I am having a lot of trouble with this geometry problem. Simply using trigonometry seems to always lead me to a dead end and I can't leverage any circle theorems (I chose the midpoint of the long side as the radius as it is a right triangle, but it didn't lead me anywhere). I noticed that the angles of the triangle are akin to dividing the triangle you get when you divide the pentagon into $10$ pieces but I also do not know how to use that information. I tried cutting up the pentagon and gluing it back together, combining with different pentagons. I don't know any more ways of solving geometry problems any more.
 A: 
First of all notice that $\widehat FBD = 36^o$ iff F is on midpoint of EG. This can be seen easily; if F is between midpoint and G then $\angle FAD>36^o$. If F is between midpoint and E the $\angle FAD<36^o$.
We draw a circle center at midpoint of AD.Vertex  B is also on this circle because $\widehat{ABF}=54^o$. Arc FA is $108^o$ because the angle opposite t0 it i.e. $\widehat {ADF}=54^o$. Therefore B must be on the circle. Hence $\widehat{ ABD}=90^o$. Therefore:
$\widehat {FBD}=90-54=36^o$
Finally:
$x=\widehat {DBC}=54-36=18^o$
Now I prove that F must be midpoint of EG.The question is : In pentagon ABCDEG inscribe a right angled triangle such that one angle is $36^o$.
Solution: take an arbitrary point like D on the side EC. Connect A to D. Take midpoint of AD as center and draw a circle which passes vertex B. This circle intersect side EG at point  F. Connect B to F. we have:
$\widehat{ABF}=\widehat{FDA}$
$\widehat {FAD}=\widehat {AFD}-\widehat{FDA}$
Now $\widehat {AFB}=90^o$ because it is opposite the diameter of circle and we want $\widehat{FAD}=36^o$, so we must have $\widehat {FDA}=54^o$. In this case we also must have $widehat {FBA}=54^o$. This is  possible only if FB bisects angle ABC . In a regular pentagon the bisector of the angle on a vertex is perpendicular  on the side opposite  and bisects that side. That is F must be midpoint of EG.
A: 
The first thing I would acknowledge that it is a bit of a convoluted proof and is not that straightforward to come to the conclusion without drawing and getting some insights. We know that perpendicular from vertex $C$ to diagonal $BE$ and to side $AE$ will make angle of $36^0 (\angle ICK = 36^0)$ and $\angle BCI = 18^0$. That will also mean $\angle DCI = 90^0$.
Now we are given $\angle DKI = 90^0, \angle KDI = 36^0, \angle DIK = 54^0$. This shows we are talking about the unique construct shown in the diagram.
That means $x = 18^0$.
Now a few interesting facts related to this problem.
We draw perp from two adjacent vertices $C, D$ to the opposite diagonal $BE$ and let the perp lines intersect sides $AE$ and $AB$ at point $H$ and $I$ respectively.
Though it is obvious based on angles but to call out points $H$ and $I$ are not the midpoints of sides $AE$ and $AB$.
Now it is easy to show $\angle EDH = \angle BCI = 18^0$, and CDHI is a rectangle with its center at $J$.
Then we draw the circumscribing circle to this rectangle. It intersects the side $AE$ of the pentagon at point $H$ but also at the midpoint $K$. Similarly points $F$ and $I$ on the side AB. It is $\triangle DKI$ that the question is referring to.
