Let P be a point on the circle (x−1)2+(y−1)2=1. We can parameterize P=(1+cosθ,1+sinθ).
Computing PA2 where A=(1,4): PA2=cos2θ+(sinθ−3)2=cos2θ+sin2θ−6sinθ+9=10−6sinθ.
Computing PB2 where B=(1,−5): PB2=cos2θ+(sinθ+6)2=1+12sinθ+36=37+12sinθ.
Therefore PA2+PB2=47+6sinθ. This is maximized when sinθ=1, i.e., θ=2π, giving P=(1,2).
Now we check: P=(1,2), A=(1,4), B=(1,−5). All three points have the same x-coordinate equal to 1, so they are collinear and lie on the vertical line x=1.
Hence the points P, A, and B lie on a straight line.