Problem

Source: Indonesia MO (INAMO) 2015 P6

Tags: geometry, equal segments, circumcircle, perpendicular



Let $ABC$ be an acute angled triangle with circumcircle $O$. Line $AO$ intersects the circumcircle of triangle $ABC$ again at point $D$. Let $P$ be a point on the side $BC$. Line passing through $P$ perpendicular to $AP$ intersects lines $DB$ and $DC$ at $E$ and $F$ respectively . Line passing through $D$ perpendicular to $BC$ intersects $EF$ at point $Q$. Prove that $EQ = FQ$ if and only if $BP = CP$.