Suppose that p ≤ q.
Since q divides (p - 1)(p + 1) and q > p - 1 it follows that q divides p + 1 and hence q = p + 1.
∴p=2 and q=3
On the other hand, if p > q then p divides (q−2)(q+2) implies that p divides q + 2 or q - 2 = 0.
This gives either p = q + 2 or q = 2.
In the former case it follows that that q divides (q + 2)2 - 1, so q divides 3.
∴p>2,q=2 and (p,q)=(5,3)