Prove that $XY$ crosses the midpoints $\triangle ABC$ has altitudes $AD$, $BE$, $CF$. The reflections of $E$, $F$ in $H$ are $E'$, $F'$. The circle $DE'F'$ intersects $BE$, $CF$ at $X$, $Y$. Prove that $XY$ goes through the midpoints of $AB$, $AC$. 
I can show that $XY$ is parallel to $BC$ by simply angle-chasing. $EYFX$ is cyclic as well as $APFY$. 
I also tried showing that $AP$=$PH+HD$
 A: To illustrate the idea of the solution, consider the following picture first, where the mid points $B_1$, $C_1$ of $CA$, $AB$, and the reflection $D'$ of $D$ in $H$ are also present.

We want to show that the points $X,H,D,B_1$ are on a cycle. This would be enough to conclude, since from here we are allowed to write the first equality in the following chain:
$$
\widehat{XB_1D} =
180^\circ - \widehat{XHD} =
\widehat{XHA} =
\widehat{EHA} =
\widehat{EFA} =
\hat C=
\widehat{B_1DC} \ .
$$
This gives $XB_1\|DC=BC$. Similarly $YC_1\|BC$. And now combine this with $XY\|BC$ obtained by the pink angle chasing from the picture, to obtain the collinearity of $B_1,C_1,X,Y$.
So let us show that $(XHDB_1)$ is cyclic by considering the two marked angles in $X$ and $B_1$ against the (a posteriori insured) arc $\overset\frown{HD}$. The angle in $X$ is complicated, but we will move it to a simple place via:
$$
\hat X = 
\widehat{E'XD} =
\widehat{E'F'D} =
\widehat{EFD'} \ .
$$
So we need to clear
$$\widehat{EFD'} \overset ?=
\widehat{HB_1D}\ .
$$
After adding the same angle,
$\widehat{EFD} = 2\widehat{EFH}=2(90^\circ-\hat C)=\widehat{DB_1C}$, on both sides, we have to clear equivalently:
$$
\widehat{D'FD} \overset ?=
\widehat{HB_1C}\ .
$$
And indeed, let us show the similarity of triangles $\Delta D'FD\sim\Delta HB_1C$. First of all, we clear an angle,
$$
\widehat{FDD'} =
\widehat{FDA} =
\widehat{FCA} =
\widehat{HCB_1}\ .
$$
It remains to get a proportion, and this is:
$$
\frac{D'D}{HC} = 
2\cdot \frac{HD}{HC} = 2\cos B
=2\cdot\frac{BD}{BA}
=2\cdot\frac{DF}{AC} 
% \text{ from }\Delta BDF\sim\Delta BAC
= \frac{DF}{AC/2}
= \frac{DF}{CB_1}\ .
$$
$\square$
A: Take point $C$ as the origin of a Cartesian coordinate system. Then let $|PD|=a$. It suffices to note that since the line $XPY$ is parallel to the base of the triangle, its equation is $y=a$. Now since the midpoints of $AC$ and $AB$ have coordinates $(x_1,a)$ and $(x_2,a)$ respectively, it's clear that they lie on the line of interest. $\square$
