I want to understand this example very well and for this I am trying to do everything that they do not do in the example or simply say without giving details.
First I think that it is not necessary to compute $\det Dg(r,\theta)=r$ because this is simple, what I would like to see is that $g$ carries the open rectangle $A$ in the $(r,\theta)$ plane onto $B$ in a one-to-one fashion. How could I do this?
To show surjective, let's take $(x,y)$ in $B$, then $(\|(x,y)\|,\tan^{-1}(y/x))$ is a preimage of $(x,y)$ in $A$ and so $g$ is surjective.
To show injectivity, let's take $(x,y)$ and $(x',y')$ in $A$ such that $(x,y)=(x',y')$, then $x=x'$ and $y=y'$ and so $\|(x,y)\|=\|(x',y')\|$ and $\tan^{-1}(y/x)=\tan^{-1}(y'/x')$, then they have the same preimage.
Why is $g^{-1}$ a class $C^{r}$?
Why the last integrals exist and can I apply Fubini's theorem, how can I apply it? Thank you very much.

Good day!
You need to compute $det$ because it's Jacobian for transformation from $f(x,y)\to f(r,\theta)$. Jacobian show you how we change "volume" then we start to use polar form.
If you sure that you will compute only "good" functions you can remember as a mantra: $r\cdot dr\cdot d\theta$.