Solve the nonlinear system by substitution

{2x+y=5
{x^2+y^2=50

since y = 5-2x,

x^2 + (5-2x)^2 = 50
x^2 + 25 - 20x + 4x^2 = 50
5x^2 - 20x - 25 = 0
x^2 - 4x - 5 = 0
(x-5)(x+1) = 0
(x,y) = (5,-5) or (-1,7)