In a pentagon $ABCDE$, $\measuredangle AED =\measuredangle BCD = 90^{\circ}$. 
In a pentagon $ABCDE$, $\measuredangle AED =\measuredangle BCD = 90^{\circ}$ and $BC = CD$ and $AE = DE$. If H is the midpoint of AB, prove that $\measuredangle CHE = 90^{\circ}$.

I’ve been working on this problem but can’t figure it out. I think the pentagon needs to be divided into triangle sort of and the angles of those found but I’m not sure how to proceed with that. Drawing the lines in of CHE gives some triangles already but I’m not sure how to find the angle measures of those. In a pentagon ABCDE, angle AED = BCD = 90 degrees and BC = CD and AE = DE. If H is the midpoint of AB, prove that angle CHE = 90 degrees.
 A: We show that $\measuredangle CHE=90^\circ$ and $|CH|=|EH|$ by using complex numbers. 
Let $D$ be the complex number $0$, and let $A=w\in \mathbb{C}$ and $B=z\in \mathbb{C}$. Then $C=\frac{z-iz}{2}$, $E=\frac{w+iw}{2}$ and $H=\frac{z+w}{2}$. Hence, it suffice to verify that 
$$i(E-H)=C-H$$
which is straightforward.
A: Let $BC=CD=a$, $DE=AE=b$, $AB=2c$, $\measuredangle BAE=\alpha$ and $\measuredangle ABC=\beta$.
Thus, by law of sines for $\Delta BDA$ we obtain:
$$\frac{2c}{\sin(\alpha+\beta-90^{\circ})}=\frac{\sqrt2a}{\sin(\alpha-45^{\circ})}=\frac{\sqrt2b}{\sin(\beta-45^{\circ})},$$ which gives
$$a=-\frac{c(\sin\alpha-\cos\alpha)}{\cos(\alpha+\beta)}$$ and
$$b=-\frac{c(\sin\beta-\cos\beta)}{\cos(\alpha+\beta)}.$$
Id est, we need to prove that:
$$a^2+c^2-2ac\cos\beta+b^2+c^2-2bc\cos\alpha=a^2+b^2-2ab\cos(360^{\circ}-\alpha-\beta)$$ or
$$c^2-ac\cos\beta-bc\cos\alpha+ab\cos(\alpha+\beta)=0$$ or
$$c^2+\tfrac{c^2(\sin\alpha-\cos\alpha)\cos\beta}{\cos(\alpha+\beta)}+\tfrac{c^2(\sin\beta-\cos\beta)\cos\alpha}{\cos(\alpha+\beta)}+\tfrac{c^2(\sin\alpha-\cos\alpha)(\sin\beta-\cos\beta)}{\cos(\alpha+\beta)}=0$$ or
$$\cos(\alpha+\beta)=\cos\alpha\cos\beta-\sin\alpha\sin\beta.$$
Done!
A: Another solution.
In the plane: 

To rotate   $\overrightarrow{PQ}$ by angle $\alpha$ around point $X$ it's to rotate this vector by angle $\alpha$ around point $P$.

Let $R^{\alpha}(\vec{a})$ be a rotation of $\vec{a}$ by $\alpha$.
We obtain:
$$R^{90^{\circ}}(\overrightarrow{HE})=R^{90^{\circ}}\left(\frac{1}{2}\overrightarrow{AB}+\overrightarrow{BC}+\overrightarrow{CD}+\overrightarrow{DE}\right)=$$
$$=R^{90^{\circ}}\left(\frac{1}{2}(\overrightarrow{AB}+\overrightarrow{BC}+\overrightarrow{CD}+\overrightarrow{DE})+\frac{1}{2}(\overrightarrow{BC}+\overrightarrow{CD}+\overrightarrow{DE})\right)=$$
$$=R^{90^{\circ}}\left(\frac{1}{2}\overrightarrow{AE}+\frac{1}{2}(\overrightarrow{BC}+\overrightarrow{CD}+\overrightarrow{DE})\right)=\frac{1}{2}\overrightarrow{ED}+\frac{1}{2}(\overrightarrow{DC}+\overrightarrow{BC}+\overrightarrow{AE})=$$
$$=\frac{1}{2}(\overrightarrow{AE}+\overrightarrow{ED}+\overrightarrow{DC}+\overrightarrow{BC})=\frac{1}{2}(\overrightarrow{AC}+\overrightarrow{BC})=$$
$$=\frac{1}{2}(\overrightarrow{AB}+\overrightarrow{BC}+\overrightarrow{BC})=\overrightarrow{HB}+\overrightarrow{BC}=\overrightarrow{HC},$$
which says $HE\perp HC$ and we are done! 
