Let $I$ be the incenter of a triangle $ABC$ and $M$ be the mid-point of the side $BC$. If the line $IM$ cuts the height $AH$ in the point $E$, show that $AE=r$, where $r$ is the radius of the circle inscribed in $ABC$.
I tried to solve this using "classical" geometry and using analytical geometry and failed.
I even drew it in Geogebra as follows:

Can someone help?
Thanks
Let $X$ and $Y$ be points of tangency of incircle and $A$-excircle with side $BC$. It is well-known that $MX=MY$.
Let $XZ$ be diameter of incircle. Consider a homothety with center $A$ that takes incircle to $A$-excircle and deduce that $A,Z,Y$ are collinear. Indeed, let $l$ be tangent to incircle at $Z$. This homothety maps $l$ to a line $m$ tangent to excircle. Of course $l \parallel m$. We see that $m=BC$, because $BC$ is tangent to excircle and parallel to $l$. We conclude that $Z$ is mapped to $Y$, as these are points of tangency of $l,m$ to these circles.
Since $M,I$ are midpoints of $XY, XZ$, it follows that $ZY \parallel IM$. Moreover $AE \parallel ZI$. Therefore $AEIZ$ is a parallelogram. Thus $AE=IZ=r$.