Let $(B_t)_{t\ge 0}$ and $(Y_t)_{t\ge 0}$ be two independent Brownian motion, and let $T$ the following stopping time $$ T=\inf\{t\ge 0 : Y_t=1 \}. $$
I should prove that
$$ \mathbb{P}(B_T \le x) = \mathbb{E} \Bigl (F \Bigl ( \frac{x}{\sqrt{T}} \Bigr ) \Bigr ), $$ where $F$ is the cumulative function of a standard Gaussian.
My attempt was writing $\mathbb{P}(B_T \le x) = \mathbb{E}(\mathbb{I}(B_T \le x)) = \mathbb{E}(\mathbb{E}(\mathbb{I}(B_T \le x)|T))$, with the second identity following from the properties of the conditional expectation. Now I would go one by saying something like $$ \mathbb{E}(\mathbb{I}(B_T \le x)|T)= F \Bigl ( \frac{x}{\sqrt{T}} \Bigr ), $$ But I’ve been failing. Can someone please suggest if this strategy is right and help me?