Let $B_t$ be $n$-dimensional Brownian motion. Let $\tau$ be the stopping time $\tau=\inf(t\in \mathbb R_+: |B_t-x| \ge r)$ with $x \in \mathbb R^n $ and $r>0$ i.e. the first exit time from a ball with radius $r$ around some point $x$. Assume we already know $\mathbb E(\tau)<\infty$
Show $\mathbb E(\tau)=\begin{cases} \frac{r^2-|x|^2}{n}, & \text{$|x|<r$} \\ 0, & \text{else} \end{cases}$
I was already able to show that $\mathbb E(\tau)=\frac 1 n \mathbb E(|B_\tau|^2)$ but I don't know how to compute $\mathbb E(|B_\tau|^2)$. I am used to hitting times where I can simply plug in the value for the stopped process but I am not sure what to do here. I can show the case where it equals $0$ but what about the other? It makes sense that it will be $r^2-|x|^2$ but what would be the right way to show this?