Can someone explain what's going on between the second equals sign, where things are converted to $r$s?
2 Answers
The integrals are converted into a double integral over the entirety of $\mathbb{R}^2$ (this is justified by Fubini's theorem) and we have
$$G^2=\int_{-\infty}^\infty\int_{-\infty}^\infty e^{-\frac{1}{2}\left(x^2+y^2\right)}dxdy$$
Then, we switch to polar coordinates where $r=\sqrt{x^2+y^2}$. The Jacobian of this transformation is simply $r$ (this is easily calculated) and we end up with
$$G^2=\int_0^\infty\int_0^{2\pi}re^{-\frac{r^2}{2}}d\theta dr$$
Since this doesn't depend on $\theta$ at all, that integral simply gives you a factor of $2\pi$ and we are left with
$$G^2=2\pi\int_0^\infty re^{-\frac{r^2}{2}}dr$$
which is the point where the image that you posted continues from.
By Fubini's theorem, you can write the product of these integrals as a double integral. Then, you move to polar coordinates, where $r^2 = x^2+y^2$ and $dxdy = rdrd\theta$.