Lagrange multipliers work in the following situation.
Suppose $g(x,y)=0$ defines a bounded level curve. Suppose also that $\nabla g \neq 0$, that is the gradient is non-zero, on this level set. Then the max an min of $f$ on $g=0$ occurs at a point that satisfies $\nabla f = \lambda \nabla g$ and $g=0$.
What if you just assume that $g(x,y)=0$ and allow for $\nabla g=0$? Then the min and max of a $f$ will occur at a point where $\nabla g =0 $ or where $\nabla f = \lambda \nabla g$ in addition to $g=0$.
However, your problem is that your constraint does not define a bounded set. Think about it, if you have an unbounded set and you are trying to maximize the distance to the origin, is this possible? No. This is the sort of situation you have.