If p and q are both odd, then r=pq−1 is even so r=2.
But in this case pq ≥ 3 × 3 = 9 and hence there are no solutions.
This proves that either p=2 or q=2. If p=2 then we have 2q=r+1 and 8+2q2=r2+1.
Multiplying the second equation by 2 we get 2r2 + 2 = 16 + (2q)2 = 16 + (r + q)2.
Rearranging the terms, we have r2−2r−15=0, or equivalently (r+3)(r−5)=0.
This proves that r=5 and hence q=3.
Similarly if q=2 then r=5 and p=3.
∴(p,q,r)=(2,3,5) and (p,q,r)=(3,2,5).