Solution (source code)

= Solution

Let $\tau=T_r\wedge T_R$. The function $z\mapsto\log|z|$ is a <harmonic function> on the annulus $r<|z|<R$, so <Itô formula> shows that
$$
\log|B_{t\wedge\tau}|
$$
is a bounded <martingale>. By the <optional sampling theorem for a supermartingale> applied to this martingale,
$$
\log|x|
=\mathbb E_x[\log|B_\tau|]
=p\log r+(1-p)\log R,
$$
where $p=\mathbb P_x(T_r<T_R)$. Solving gives the <planar Brownian annulus hitting probability>
$$
\mathbb P_x(T_r<T_R)
=\frac{\log R-\log|x|}{\log R-\log r}.
$$