Find points on the curve x^2-xy+y^2=9 closest to and farthest from the origin.

I know the distance of point from the origin is, r = sqrt(x^2 + y^2)

Then I subbed the equation into, r(x) = sqrt(x^2 + [f(x)]^2)

and got 9 = sqrt(x^2 + [x^2-xy+y^2]^2)

and I'd solve it when it = 0 to find max and min distance.

I'm not sure if what I'm doing is right? Any help would be appreciated!