Call A' the intersection of the circle with AP Call B' the intersection of the circle with BP Call P' the intersection of A'B and AB'
Then PP' is perpendicular to AB
!enter image description here
Now, the proof :
You have that :
* The triangle AA'B is a right triangle because it's a triangle inscribed in a circle with one of its side as a diameter.
* The triangle AB'B is a right triangle because it's a triangle inscribed in a circle with one of its side as a diameter.
This gives you that, for the triangle APP',
* PB' is the altitude from the vertex P
* P'A' is the altitude from the vertex P'
So B, the intersection of PB' and P'A', is the orthocentre.
It follow that AB is the altitude from the vertex A, hence AB and PP' are perpendicular