# A geometry problem about excircles and the tangency points

The excircle to side $$BC$$ of $$\triangle ABC$$ is tangent to lines $$BC,AB$$ and $$AC$$ at $$D,E,F$$ respectively. Let $$P$$ be the orthogonal projection of $$D$$ onto $$EF$$. Let the midpoint of $$EF$$ be $$M$$. Prove $$ABCP$$ cyclic if and only if $$ABCM$$ cyclic.

I didn't make much progress, except for $$AD=AE$$ (obviously), $$AM//DP$$ and $$ME=MF=MI_A$$ by the incircle excircle lemma. A friend told me to do root BC inversion, but that just move the excircle to the incircle/mixtilinear incircle?

First we know that $$M$$ lies on the angle bisector of $$\angle BAC$$. Therefore if we assume $$ABCM$$ is cyclic, $$M$$ is the midpoint of arc $$BC$$ not containing $$A$$.
Let $$EF$$ intersect the circumcircle of $$ABC$$ again at $$P'\neq M$$. Since $$AMP'=90^{\circ}$$, $$P'$$ is the point diametrically opposite to $$A$$ in circle $$ABC$$.
Construct parallel to $$AM$$ at $$P'$$ intersecting the circle $$ABC$$ again at $$M'$$ and the line $$BC$$ at $$D'$$. $$AMP'M'$$ is a rectangle and thus $$M'$$ is the point diametrically opposite $$M$$ in circle $$ABC$$. This means $$M'$$ is actually the midpoint of arc $$BC$$ containing $$A$$. As a result, $$\angle BP'D'=\angle CP'D'$$. This combined with $$D'P'$$ perpendicular to $$EF$$, gives $$K,D',C,B$$ harmonic, where $$K$$ is the intersection of $$BC$$ and $$EF$$. ($$K$$ is the point that is not labelled in my diagram.) However, it is actually very well known that $$(K,D;C,B)=-1$$ so $$D'=D$$ and $$P'=P$$. So we are done.
The converse is the same thing: if $$P$$ is on circle $$ABC$$, $$PD$$ is the angle bisector of $$\angle BPC$$, and thus pass through the midpoint $$M'$$ of arc $$BAC$$. Line $$EFP$$ then intersects the circle again at $$M$$, the diametrically opposite point of $$M'$$. $$M$$ is then the midpoint of arc $$BC$$ not containing $$A$$. then $$AM$$ bisects $$\angle FAE$$ and hence $$M$$ is midpoint of $$EF$$.