Point P (a, b) is on the straight line x + y + 1 = 0, find the minimum value of A2 + B2 − 2A − 2B + 2

Point P (a, b) is on the straight line x + y + 1 = 0, find the minimum value of A2 + B2 − 2A − 2B + 2

The minimum value of ∵ point P (a, b) on the straight line x + y + 1 = 0, ∵ A2 + b2-2a-2b + 2 = (A-1) 2 + (B-1) 2, ∵ A2 + b2-2a-2b + 2 is the distance from point (1, 1) to straight line x + y + 1 = 0,