In the given figure, there is a square $EFGH$ of side $x$ units inside a regular pentagon . Note that $E$ is the common vertex of square and pentagon. Find $x$.
My try:
We know that equation of $AB$ is $$y-0=-\cot(36^{\circ})(x-1)$$
For some $\lambda \in R$, the coordinates of $H$ is: $$H(\lambda, (1-\lambda)\cot(36^{\circ}))$$
Now if we get $\lambda$, we can find $EH$.
But any clue how to find $\lambda$
Also the coordinates of $E$ is: $(\cos(288^{\circ}),\sin(288^{\circ}))$

This problem has no solution ! It is said more or less in different comments, that I try to put together here in order to close this question.
Indeed, if we attempt to build such a square with side $x$, due to the symmetry of the figure with respect to $EI$ (where $I$ denotes the midpoint of $BC$), the circle with center $E$ and radius $x$ would intersect $AB$ and $CD$ in $F$ and $H$ in such a way that $AH=DF$. Therefore the solution square would have its fourth vertex $G$ in $I$ for this symmetry reason.
But no square is possible in such a symmetrical configuration.
Here is a short proof: Let us assume that such a square with side $x$ exists, with $G=I$ the midpoint of $BC$. Let us denote by $y$ the side of the pentagon.
Knowing that the angles of the pentagon are $\frac15 540= 108°$, by angle chasing, $\angle DEF=9° \implies \angle DFE= 63° \implies \angle CFG=27°$.
As a consequence, applying sine law
to triangle $DEF$: $\dfrac{y}{x}= \dfrac{\sin 63°}{\sin 108°}$
to triangle $CFG$: $\dfrac{y/2}{x}= \dfrac{\sin 27°}{\sin 108°}$
It would mean that
$$\sin 63°=2 \times \sin 27°\tag{3}$$
which is false (I am indebted to @Intelligenci Pauca for having spotted an error of mine in this reasoning).
In fact, the LHS and RHS of (3) differ by $0.017$ which is not very important...