It's not difficult to show that, in $\triangle XYZ$ with orthocenter $W$ and circumdiameter $d$, we have this nice counterpart to the Law of Sines:
$$\frac{|\overline{WX}|}{|\cos X|} = \frac{|\overline{WY}|}{|\cos Y|} = \frac{|\overline{WZ}|}{|\cos Z|} = d$$
In your $\triangle ABC$ and $\triangle APC$, the angles at $B$ and $P$ subtend the same chord, $\overline{AC}$, and are therefore congruent (by the Inscribed Angle Theorem). Writing $d$ for the common circumdiameter, we have
$$|\overline{BH_1}| = d\;|\cos B| = d\;|\cos P| = |\overline{PH_2}| \qquad\qquad(\star)$$
Since $\overline{BH_1}$ and $\overline{PH_2}$ are clearly parallel, and now also congruent, it follows that $\square BH_1H_2P$ is a parallelogram. Thus, $\overline{BP}\cong\overline{H_1H_2}$.
Note that $(\star)$ says, for fixed $A$ and $C$ on a circle, the distance from a moving $B$ on that circle to the orthocenter of the corresponding $\triangle ABC$ is constant; the locus of those orthocenters, then, is a translate of the circle. This is especially-easy to see when $\overline{AC}$ is a diameter of the circle.