Problem. Let $P$$P$ be a point inside triangle $ABC$$ABC$ such that $\mathrm{\angle }CPA={90}^{\circ }$$\angle{CPA}=90^{\circ}$ and $\mathrm{\angle }CBP=\mathrm{\angle }CAP$$\angle{CBP}=\angle{CAP}$. Let $X$$X$ and $Y$$Y$ be the midpoints of $AB$$AB$ and $AC$$AC$ respectively. Prove that $\mathrm{\angle }PXY={90}^{\circ }$$\angle{PXY}=90^{\circ}$.
Solution. Let's consider a homothety with center $A$$A$ and scale factor $2$$2$. This homothety maps $X\to B$$X \to B$, $Y\to C$$Y \to C$, $P\to {P}^{\prime }$$P \to P'$, where ${P}^{\prime }$$P'$ is the point on the ray $AP$$AP$ such that $AP=P{P}^{\prime }$$AP=PP'$.
Notice that since $\mathrm{\angle }CPA={90}^{\circ }$$\angle{CPA}=90^{\circ}$, $P$$P$ lies on the circle with diameter $AC$$AC$ and center $Y$$Y$. Thus, $AY=YP$$AY=YP$. These two segments, $AY$$AY$ and $YP$$YP$, map to the segments $AC$$AC$ and $C{P}^{\prime }$$CP'$ respectively under the homothety considered above. Therefore, $AC=C{P}^{\prime }$$AC=CP'$. This, in turn, implies that $\mathrm{\angle }{P}^{\prime }AC=\mathrm{\angle }A{P}^{\prime }C$$\angle{P'AC}=\angle{AP'C}$. When we combine this with the condition $\mathrm{\angle }CBP=\mathrm{\angle }CAP$$\angle{CBP}=\angle{CAP}$, we obtain $\mathrm{\angle }P{P}^{\prime }C=\mathrm{\angle }CBP$$\angle{PP'C}=\angle{CBP}$. This implies that the the quadrilateral $CPB{P}^{\prime }$$CPBP'$ is inscribed (cyclic). Therefore, $\mathrm{\angle }CB{P}^{\prime }=\mathrm{\angle }CP{P}^{\prime }={90}^{\circ }$$\angle{CBP'}=\angle{CPP'}=90^{\circ}$. Finally, notice that under the homothety considered above the angle $\mathrm{\angle }PXY$$\angle{PXY}$ maps to the angle $\mathrm{\angle }{P}^{\prime }BC$$\angle{P'BC}$, thus $\mathrm{\angle }PXY=\mathrm{\angle }{P}^{\prime }BC={90}^{\circ }$$\angle{PXY}=\angle{P'BC}=90^{\circ}$, and we are done.