dydx=x+y−2x−y…(1)
Put x=X+h, y=Y+k
dYdX=X+YX−Y…(2)
Where h+k−2=0 and h−k=0
⇒ h=k=1
Equation (2) is homogenous differential equation so put Y=vX in equation (2)
v+XdvdX=1+v1−v⇒ v−1v2+1dv=−1XdX…(3)
Integrate
ln(v2+1)−2tan−1v=−2lnX+c
ln(v2X2+X2)=2tan−1v+c
ln(Y2+X2)=2tan−1(YX)+c
ln[(x−1)2+(y−1)2]=2tan−1(y−1x−1)+c…(4)
It is passing through (2,1) so c=0
⇒ ln((x−1)2+(y−1)2)=2tan−1(y−1x−1)…(5)
It is also passing through point (k+1,2) so
ln(1+k2)=2tan−1(1k)