Unclear time-to-frequency integration step
That's an application of Parseval's (Plancherel's) Theorem:
$$\int_{-\infty}^{\infty}f(t)g^*(t)dt=\frac{1}{2\pi}\int_{-\infty}^{\infty}F(\omega)G^*(\omega)d\omega\tag{1}$$
where $F(\omega)$ and $G(\omega)$ are the Fourier transforms of $f(t)$ and $g(t)$, respectively. I've used $^*$ to denote complex conjugation.