= Solution
The exit time $T$ is finite <almost surely>. Indeed, if the <Brownian motion> is still in $(-b,a)$ at an integer time, its next unit increment exceeds $a+b$ with a fixed probability $p>0$ independent of the past; on this event it must exit before the next integer time. Consequently $\mathbb P(T>n)\leq(1-p)^n\to0$. Path <continuity> gives $B_T\in\{a,-b\}$, and the two exit events partition the <probability space> up to null sets.
For each real $\lambda$, the <exponential Brownian martingale> $Z_t^\lambda=\exp(\lambda B_t-\lambda^2t/2)$ has expectation one. This follows directly from the <moment-generating function of a normal distribution> and <independent increments>. At $t\wedge T$ its value is bounded by $e^{|\lambda|\max(a,b)}$. Bounded-time <optional stopping> and then <dominated convergence> therefore give
$$
1=\mathbb E e^{\lambda B_T-\lambda^2T/2}.
$$
Write $p_\lambda=\mathbb E[e^{-\lambda^2T/2}\mathbf1_{\{T=T_a\}}]$ and $q_\lambda=\mathbb E[e^{-\lambda^2T/2}\mathbf1_{\{T=T_{-b}\}}]$. Applying the identity to $\lambda$ and $-\lambda$ yields
$$
e^{\lambda a}p_\lambda+e^{-\lambda b}q_\lambda=1,\qquad
e^{-\lambda a}p_\lambda+e^{\lambda b}q_\lambda=1.
$$
For $\lambda\ne0$, multiply the first equation by $e^{\lambda b}$, the second by $e^{-\lambda b}$, and subtract. Solving the resulting system gives
$$
\boxed{p_\lambda=\frac{\sinh(\lambda b)}{\sinh(\lambda(a+b))},\qquad q_\lambda=\frac{\sinh(\lambda a)}{\sinh(\lambda(a+b))}.}
$$
Adding and using the sum formula for the <hyperbolic sine> gives the <asymmetric Brownian interval-exit transform>:
$$
\boxed{\mathbb E e^{-\lambda^2T/2}
=\frac{\sinh(\lambda a)+\sinh(\lambda b)}{\sinh(\lambda(a+b))}
=\frac{\cosh(\lambda(a-b)/2)}{\cosh(\lambda(a+b)/2)}.}
$$
At $\lambda=0$, the printed sine ratio is $0/0$ and needs its removable extension. <Dominated convergence> as $\lambda\to0$ gives
$$
\boxed{\mathbb P(T=T_a)=\frac b{a+b},\qquad\mathbb P(T=T_{-b})=\frac a{a+b},\qquad\mathbb E e^0=1.}
$$
Thus the formulas hold for every real parameter with this endpoint convention. The expectation on the left of the first formula is legible in the original PDF; the converted TeX's nested exponential is an OCR error.
Back to article page