The task is to compute the distribution of
$$ \tau:=\inf\{t\ge1 : B_t=0\} $$ where $(B_t)_{t\ge0}$ is a standard Brownian motion.
We denote by $P^x$ the distribution of $x+B$.
Calculating the distribution under $P^0$ yields
$$ P^0(\tau\le t)=\dots=E^0[E^{B_1}[1_{\tau\le t-1}]]=\int_{-\infty}^{\infty}p_1(0,x)P^x(\tau\le t-1)dx= \\ \dots=\frac{2}{\pi}\arctan(\sqrt{t-1}) $$
where $p_t(a,y)$ is the density of the normal distribution with mean $a$ and variance $t$.
I get all the steps (which I left out here) except this one step in the middle where the double expectation is written as integral.
Can anyone explain where that comes from?
Okay, we'll try writing this out more: For any fixed event $\omega$
$$ E^{B_1(\omega)}[1_{\tau\leq t-1}]=P^{B_1(\omega)}(\tau\leq t-1), $$ simply by definition of the Lesbegue Integral/expectation/what have you.
Note that $\omega\mapsto B_1(\omega)$ has the $\mathcal{N}(0,1)$ distribution.
Hence, \begin{align} E^0[E^{B_1}[1_{\tau\leq t-1}]]&=\int_{C([0,\infty))} E^{B_1(\omega)}[1_{\tau\leq t-1}]\textrm{d}P^0(\omega)=\int_{\mathbb{R}} E^x [1_{\tau\leq t-1}]\textrm{d} B_1(P^0)(x)\\ &=\int_{\mathbb{R}} E^x [1_{\tau\leq t-1}]\textrm{d}\mathcal{N}(0,1)(x)=\int_{\mathbb{R}} p_1(0,x) E^x [1_{\tau\leq t-1}]\textrm{d} x, \end{align} by the defining property of the push-forward measure. I've inserted $\omega$'s to highlight which part of the integral is actually the varaible.