Explanation:
It's a system of equations.
From the first one we isolate x:
x = 9-y
And we substitute in the second one:
(9-y)y = 14
-y^2 + 9y - 14 = 0
y^2 - 9y + 14 = 0
D = 25
y1/2 = (9 +- 5)/2 = 2 or 7
y = 2 => x = 7
y = 7 => x = 2
x^2 + y^2 = 7^2 + 2^2 = 53