You can simplify the algebra a bit by realizing that you are really just looking to maximize $$f(x,y) = 5x^2+2xy+2y^2 $$ subject to the constraint $$g(x,y)=x^2+y^2=1000$$ so that $$f(x,y) = 3x^2+2xy+2000 $$
You can simplify the algebra a bit by realizing that you are really just looking to maximize $$f(x,y) = 5x^2+2xy+2y^2 $$ subject to the constraint $$g(x,y)=x^2+y^2=1000$$ so that $$f(x,y) = 3x^2+2xy+2000 $$