Let $B$ be a standard Brownian motion and let $\alpha, \beta > 0$. Let \begin{align} \tau = \inf\{t \geq 0 : B_t = \alpha \ \ \text{or}\ \ B_t=-\beta\}. \end{align} It can be shown by defining independent events $A_j = \{|B_{j+1}-B_{j}| \geq \alpha + \beta\}$ for integers $0 \leq j \leq n-1$ and $\epsilon = \mathbb{P}(A_j) = \mathbb{P}(A_0) $, that there exists an $\epsilon \in (0,1)$ such that $\mathbb{P}(\tau \geq n) \leq (1-\epsilon)^{n}$.
My question is about showing that for all $p \geq 1$, $\mathbb{E}[\tau^p] < \infty$. I do not understand why \begin{align} \mathbb{E}[\tau^p] = \int_0^\infty p t^{p-1} \mathbb{P}(\tau \geq t ) dt. \end{align} And subsequently why is \begin{align} \int_0^\infty p t^{p-1} \mathbb{P}(\tau \geq t ) dt = \sum_{n=0}^\infty \int_n^{n+1} p t^{p-1} \mathbb{P}(\tau \geq t ) dt ? \end{align}