x^2 + y^2 = 2x + 2y

x^2 - 2x + y^2 - 2y = 0

Complete the square on x and y and we have that

x^2 - 2x + 1 + y^2 -2y + 1 = 2

( x - 1)^2 + (y - 1)^2 = 2

x will be maximized when y = 1...so....

(x - 1)^2 = 2 take the positive square root

x - 1 = √2

x = √2 + 1