The equation of circle through A and B as in part (a) is S+λP=0
or (x+1)(x−1)+(y−4)(y−2)+λ(x+y−3)=0
or x2+y2+λx+(λ−6)y+(7−3λ)=0
The circle touches the line 3x - y - 3 = 0.We may apply the condition of tangency i.e.p = r and find two values of λ yourself.
Another method is that if the line is a tangent then it will cut the circle in two coincident points.
Putting y = 3(x -1 ) in the equation of circle, we get
x2+9(x−1)2+λx+3(x−1)(λ−6)+7−3λ=0
or 10x2+(−36+4λ)x+(34−6λ)=0
The roots of the above quadratic should be equal
∴Δ=0
λ2−18λ+81−5(17−3λ)=0
λ2−3λ−4=0orλ=4,−1
Hence the circles are :
x2+y2+4x−2y−5=0
and x2+y2−x−7y+10=0