Boundaries of a doughnut-shaped surface to simplify Stokes theorem problem This question is taken from a former exam for my calculus class.
Let $D$ be the surface given by $(\sqrt{x^2+y^2}-3)^2+z^2=1$ where $z\geq0$. The vectorfield $F$ is equal to $F(x,y,z) = [a, b, c]$.
a, b, c were some arbitrary combinations of variables where the curl of $F$ ended up having nasty $x$ and $y$ components, but with a simple $z$ component equal to $-(3+x)$
The question was to calcuate $\iint_D (curl F)*\hat N dS$ where $\hat N$ is the unitnormal for $S$ with positive $k$-component. 
No idea about where to begin with the surface equation $(\sqrt{x^2+y^2}-3)^2+z^2=1$, I looked at the solution where they simply say let $D'$ be the surface $2 \leq \sqrt{x^2+y^2} \leq 4$ where $z=0$. Then $D$ and $D'$ share the same boundary (the two circles): $x^2+y^2=4$ and $x^2+y^2=16$. Positive $k$ component simplifies the integrand to the $z$ component only: $-(3+x)$. $x$ being an odd function, we are left with 
$$-3\iint_D dxdy$$ which evaluates to $-3*\pi(4^2-2^2) = -36\pi$
There was a simple sketch of the doughnut shape the surface $D$ forms in the exam paper. 
Working with $D$, setting $z=0$, I ended up with
$x^2+y^2-6\sqrt{x^2+y^2}+9=1$
$x^2+y^2-6\sqrt{x^2+y^2}=-8$
My question is; how am I supposed to make this realization?
Specifically, how do I go from this expression $x^2+y^2-6\sqrt{x^2+y^2}=-8$, to realizing that the boundaries can be expressed as two circles with $r=4$ and $r=16$, respectively, and thus simplifying the problem significantly?
Thank you in advance!

The isosurfaces of a smooth function at a regular value are manifolds without boundary, so the isosurface
$$\left(\sqrt{x^2+y^2}-3\right)^2 + z^2 = 1$$
would have no boundary. A boundary only arises because this surface is being intersected with the upper half-space $z\geq 0$.
So, to find the boundary, we need to find where the surface is being cut by the plane $z=0$. This leads to
$$\left(\sqrt{x^2+y^2}-3\right)^2 = 1.$$
There is no need to square things out; just take the square root of both sides to get
$$\|(x,y)\| = 3\pm 1$$
which of course is a pair of circles on the $z=0$ plane with center at the origin.
