Let $a<0<b$ and $\mu\in \mathbb{R}$, and $X_t= \mu t+ B_t$ be a drifted brownian motion. Given a suitable $r>0$, is it possible to compute $$ \mathbb{E}[e^{r\tau_a}1_{\tau_a<\tau_b}], $$ where $\tau_a=\inf\{t\ge 0|X_t=a\}$ and $\tau_b=\inf\{t\ge 0|X_t=b\}$ are the first hitting times?
If $r=0$, $\mathbb{E}[1_{\tau_a<\tau_b}]$ can be expressed in terms of solutions to a forward Kolmogorov equation for the density of $X$. I don't know how to adapt this idea with an additional exponential factor.
Define $V_T(X_t) \equiv \mathbb{E_t}[\int_{T}^{\tau_a}re^{r(t-T)}dt\times1_{\tau_a\leq\tau_b}]+\mathbb{E_t}[1_{\tau_a\leq\tau_b}]$.
For $T\leq\min(\tau_a,\tau_b)$, $V(X_t)$ follows the Kolmogorov Backward equation: $$ \begin{aligned} 0 &= r(V+1)+\mu V_x + .5\sigma^2 V_{xx} \\ V(a) &= 1 \\ V(b) &= 0 \end{aligned} $$ Furthermore, we have $\tilde{V(X_T)}=\mathbb{E}_{t}[1_{\tau_a\leq\tau_b}]$, which solves: \begin{aligned} 0 &= \mu \tilde{V}_x + .5\sigma^2 \tilde{V}_{xx} \\ \tilde{V}(a) &= 1 \\ \tilde{V}(b) &= 0 \end{aligned}