[proofplan]
We prove $u$ is harmonic by showing it satisfies the mean value property: $u(x)$ equals the average of $u$ over any sphere centred at $x$ contained in $D$. The [Strong Markov Property](/theorems/1180) at the first exit time from a ball $B(x, \delta) \subset D$ reduces $u(x)$ to $\mathbb{E}_x[u(B_{\tau'})]$, and rotational invariance of Brownian motion places $B_{\tau'}$ uniformly on the [boundary](/page/Boundary) sphere.
[/proofplan]
[step:Apply the strong Markov property at the first exit time from a ball]
Fix $x \in D$ and $\delta > 0$ with $\overline{B}(x, \delta) \subset D$. Define $\tau' = \inf\{t > 0 : B_t \notin B(x, \delta)\}$, the first exit time of $B$ from the open ball $B(x, \delta)$. Since $B(x, \delta)$ is bounded, $\tau' < \infty$ $\mathbb{P}_x$-a.s., and by path [continuity](/page/Continuity), $B_{\tau'} \in \partial B(x, \delta)$.
Since $\overline{B}(x, \delta) \subset D$, the exit from $B(x, \delta)$ occurs strictly before the exit from $D$: $\tau' < \tau$ $\mathbb{P}_x$-a.s. By the [Strong Markov Property](/theorems/1180) applied at $\tau'$, the post-$\tau'$ process $(B_{\tau'+t} - B_{\tau'})_{t \geq 0}$ is a standard Brownian motion independent of $\mathcal{F}_{\tau'}^+$. The exit time of $B$ from $D$ after time $\tau'$ is $\tau - \tau'$, which depends only on the post-$\tau'$ path and $B_{\tau'}$. Therefore
\begin{align*}
u(x) &= \mathbb{E}_x[\varphi(B_\tau)] = \mathbb{E}_x\bigl[\mathbb{E}_{B_{\tau'}}[\varphi(B_\tau)]\bigr] = \mathbb{E}_x[u(B_{\tau'})],
\end{align*}
where the second equality is the strong Markov property (conditioning on $\mathcal{F}_{\tau'}^+$ and using that the post-$\tau'$ Brownian motion starts fresh from $B_{\tau'}$) and the third uses the definition $u(y) = \mathbb{E}_y[\varphi(B_\tau)]$.
[guided]
Let us unpack the strong Markov property more carefully. We need to show
\begin{align*}
\mathbb{E}_x[\varphi(B_\tau) \mid \mathcal{F}_{\tau'}^+] = u(B_{\tau'}).
\end{align*}
The exit time $\tau$ can be decomposed as $\tau = \tau' + \hat{\tau}$, where $\hat{\tau} = \inf\{t \geq 0 : B_{\tau'+t} \notin D\}$ is the first exit time of the post-$\tau'$ Brownian motion from $D$. By the [Strong Markov Property](/theorems/1180), the process $\hat{B}_t = B_{\tau'+t} - B_{\tau'}$ is a standard Brownian motion independent of $\mathcal{F}_{\tau'}^+$, and $B_\tau = B_{\tau'} + \hat{B}_{\hat{\tau}}$. Since $\hat{\tau}$ is determined by $\hat{B}$ and $B_{\tau'}$, and the boundary data $\varphi$ is applied at $B_\tau = B_{\tau'} + \hat{B}_{\hat{\tau}}$:
\begin{align*}
\mathbb{E}_x[\varphi(B_\tau) \mid \mathcal{F}_{\tau'}^+] = \mathbb{E}_x[\varphi(B_{\tau'} + \hat{B}_{\hat{\tau}}) \mid B_{\tau'}] = \mathbb{E}_{B_{\tau'}}[\varphi(B_{\tau_D})] = u(B_{\tau'}),
\end{align*}
where $\tau_D$ denotes the exit time from $D$ of a Brownian motion started at $B_{\tau'}$. Taking outer expectations gives $u(x) = \mathbb{E}_x[u(B_{\tau'})]$.
[/guided]
[/step]
[step:Use rotational invariance to identify $\mathbb{E}_x[u(B_{\tau'})]$ as the spherical average]
By [Invariance Properties of Brownian Motion](/theorems/1175)(i), the process $B$ started at $x$ is rotationally invariant about $x$: for any orthogonal $U \in O(d)$, $U(B_t - x) + x$ has the same law as $B_t$ under $\mathbb{P}_x$. The exit time $\tau'$ depends only on $|B_t - x|$ (since $B(x,\delta)$ is a ball centred at $x$), so it is invariant under rotations about $x$. Therefore $B_{\tau'}$ is uniformly distributed on the sphere $\partial B(x, \delta)$:
\begin{align*}
u(x) = \mathbb{E}_x[u(B_{\tau'})] = \frac{1}{\mathcal{H}^{d-1}(\partial B(x, \delta))} \int_{\partial B(x, \delta)} u(y) \, d\mathcal{H}^{d-1}(y).
\end{align*}
This is the mean value property of $u$ at $x$.
[/step]
[step:Conclude harmonicity from the mean value property]
The [function](/page/Function) $u$ is continuous on $D$ (since it is an average of a bounded function against the transition kernel, which depends continuously on $x$). Since $u$ satisfies the mean value property at every $x \in D$ for every $\delta > 0$ with $\overline{B}(x, \delta) \subset D$, and $u$ is continuous, the [Converse of the Mean Value Property](/theorems/910) gives $\Delta u = 0$ on $D$. Therefore $u$ is harmonic on $D$.
[/step]