First solution. Let E be the intersection point of diagonals AC and BD. Assume for definiteness that point K lies on segment BE. Let the line passing through K and parallel to PM intersect AC at point N (see Fig. 8). Then △NKE∼△PME (since their sides are parallel), hence EMPE=EKNE. On the other hand, the right triangles AKE and CME are also similar (by the acute angle at vertex E), so ECEM=EAEK. Multiplying the obtained equalities, we get ECPE=EANE. But by Thales' theorem ECPE=EBKE.
Thus, we have EANE=ECPE=EBKE, whence KN∥AB. Therefore, PM∥AB⊥BC∥KP, as required.
Second solution. Again, let E be the intersection point of diagonals AC and BD and consider the case when point K lies on segment BE. Note that ∠PAD=∠CAD=∠CBD=∠PKD, that is, quadrilateral AKPD is cyclic (see Fig. 9). Therefore, ∠AKD=∠APD=90∘. Then from the relation ∠CPD=∠CMD=90∘ it follows that quadrilateral CPMD is also cyclic, whence ∠KPM=180∘−∠CPM=∠EDC=∠BAC=∠BAE. From this it follows that PM∥AB⊥BC∥KP, as required.
The case when K lies on segment DE is considered similarly.

