Let ∣BC∣=a, ∣CA∣=b and ∣AB∣=c be the lengths of the sides of the triangle ABC and let s=21(a+b+c) be its semiperimeter. Without loss of generality we may assume b<c.
Let S be the intersection of lines BC and MN, and let X be the point where the incircle of the triangle ABC touches the side BC.

Menelaus' theorem applied to the line MN and the triangle ABC gives
∣BM∣∣AM∣⋅∣CS∣∣BS∣⋅∣AN∣∣CN∣=1.
Since ∣AM∣=∣AN∣=s−a, ∣BM∣=∣BX∣=s−b and ∣CN∣=∣CX∣=s−c, we have
∣BM∣∣AM∣⋅∣CX∣∣BX∣⋅∣AN∣∣CN∣=1,
and hence
∣CX∣∣BX∣=∣CS∣∣BS∣=∣SX∣−∣CX∣∣SX∣+∣BX∣.
Denoting ∣SX∣=d gives
s−cs−b=d−(s−c)d+(s−b),
i.e. d(c−b)=2(s−b)(s−c).
We also have ∣PX∣=∣CX∣+∣CP∣=(s−c)+(s−a)=b, analogously ∣QX∣=c and ∣SM∣⋅∣SN∣=∣SX∣2 (by the power of the point S with respect to the incircle of the triangle ABC).
Finally, the following sequence of equivalent statements finishes the proof:
The quadrilateral MNPQ is cyclic.
⟺∣SM∣⋅∣SN∣⟺∣SX∣2⟺d2⟺d(c−b)⟺2(s−b)(s−c)⟺a2−(b−c)2⟺a2⟺The triangle ABC has a right angle at vertex A.=∣SP∣⋅∣SQ∣=(∣SX∣−∣PX∣)(∣SX∣+∣QX∣)=(d−b)(d+c)=bc=bc=2bc=b2+c2