If x−2=0⇔x=2, then y=1 and we have the solution (x,y)=(2,1).
If x−2=0, then, since p is prime, from the equation p(x−2)=x(y−1) it follows that y=1 and p∣x or p∣y−1. Therefore we have the cases:
* If p∣x, then x=px′, where x′ positive integer, and then:
p(px′−2)=px′(y−1)⇔px′−2=x′(y−1)⇔x′(p−y+1)=2⇔x′=1,p−y+1=2ηx′=2,p−y+1=1⇔x′=1,y=p−1ηx′=2,y=p⇔x=p,y=p−1ηx=2p,y=p⇔(x,y)=(p,p−1)η(x,y)=(2p,p)
* If p∣y−1, then y−1=py′, where y′ is a positive integer and then
p(x−2)=xpy′⇔x−2=xy′⇔x(1−y′)=2⇔x=1,1−y′=2ηx=2,1−y′=1⇔x=1,y′=−1 (impossible) or x=1,y′=0 (impossible).
Moreover, if we are given x+y=21, then we have:
* Considering the solutions (x,y)=(p,p−1), we find 2p−1=21⇔p=11, and so (x,y,p)=(11,10,11).
* Considering the solutions (x,y)=(2p,p), then 3p=21⇔p=7, and hence we find (x,y,p)=(14,7,7).