From the second equation, we get
xa−1=1−yb or x−aa=b−yb=k, say
Then x=a(1+k) and y=b(1−k) (1)
Substituting these values of x and y in first equation, we have
ab(1+k)b(2−k)+ab(1−k)a(2+k)=a+b2
or a(1+k)2−k+b(1−k)2+k=a+b2
or [a(1+k)2−k−a2]+[b(1−k)2+k−b2]=0
or 3ak2−k−3bk2+k=0
or k[a(2+k)−b(2−k)(2−k)(2+k)]=0
or k[(a+b)k−2(b−a)=0
∴k=0 or k=2(b−a)b+a
Substituting these values of k in (1), we get
x=a(1+0)=a and y=b(1−0)=b
or x=a{1+2(b−a)b+a}=a(3b−a)a+b
and y=b{1−2(b−a)b+a}=b(3a−b)a+b
Hence the solutions are
x=a,y=b or x=a(3b−a)a+b, y=b(3a−b)a+b.