Let $W$ be standard
Brownian motion and $Y$ geometric
Brownian motion, i.e., for $t\geq 0$
$$
Y_{t}=y_{0}\exp (\alpha t+\sigma W_{t}),
$$
where $y_{0}\in \mathbb{R}_{++}$, $\alpha \in \mathbb{R}$, and $\sigma \in
\mathbb{R}_{++}$.
The Handbook of Brownian Motion by Borodin and Salminen says that for any $y\geq y_{0}$ and $r>0$
$$
\Bbb{E}[e^{-r\tau _{y}}]=\left(\frac{y_{0}}{y}\right)^{\kappa},
$$
where $\tau_y$ is the time of the first transition to $y$ and
$$
\kappa =\left(\sqrt{\alpha ^{2}+2r\sigma ^{2}}-\alpha \right)\sigma ^{-2}
$$
is a strictly positive constant.
Which I think means you are close.
I think you can solve this via Markov chain techniques. Let $X$ and $\tau$ be as given (or more generally $X$ can be any elliptic diffusion). Denote the generator of $X$ as $L_X$. Define a function $f:[a,b] \to \Bbb R$ by sending $x \mapsto E_x[e^{-\lambda \tau}].$ We claim that $f$ satisfies an ODE: $L_X f- \lambda f=0$ on $[a,b]$, with boundary conditions $f(a)=f(b)=1$.
To prove this, we define a new state space $S=[a,b] \cup \{(*)\}$, where $(*)$ is a "death state" disjoint from $[a,b]$. We define the $S$-valued Markov process $X'_t:=X_t \cdot 1_{\{t < \tau\}} + (*)\cdot 1_{\{t \geq \tau\}}$. In other words, the process $X'$ is just the process $X$ which is "killed" upon hitting the boundary. This new process has a generator $L$ which is just $L_X$ with Dirichlet boundary conditions at $\{a,b\}$. We denote by $S(t)$ the associated semigroup.
Before proving the claim, let us recall the notion of resolvents: for $\lambda>0$, one has a bounded operator $R_{\lambda}: C(S) \to C(S)$ given by $R_{\lambda}f = (\lambda I-L)^{-1}f = \int_0^{\infty} e^{-\lambda t} S(t)f \;dt.$
Next, we make the simple observation that for any random variable $Y$ supported on $[a,b]$ and any $C^1$ function $u$, it holds (by Fubini's theorem) that $E[u(Y)] = u(a)+ \int_a^b u'(y) P(Y \geq y)dy$. Consequently, we have the following for all $x \in S$: $$f(x)-1 = E_x[e^{-\lambda \tau}] -1 = -\int_0^\infty \lambda e^{-\lambda x} P_x(\tau \geq t) dt \\= -\int_0^\infty \lambda e^{-\lambda x} P_x(X'_t \in [a,b]) dt =-\int_0^\infty \lambda e^{-\lambda x} S(t)1_{[a,b]}(x) dt= -\lambda R_{\lambda} (1_{[a,b]})(x).$$ This shows that $f-1=-\lambda R_{\lambda}(1_{[a,b]})$ is in the domain of $L$. Now taking $\lambda I -L$ of both sides, we find that $(\lambda-L)(f-1) = -\lambda \cdot 1_{[a,b]}$, which indeed shows that $\lambda f-L_X f=0$ on $[a,b]$, thus proving the claim.
In this specific case $(X_t=B_t+\mu t)$, we have $L_X=\frac{1}{2}\partial_x^2+\mu \partial_x$. Consequently, $f$ satisfies the ODE $f''+2\mu f'-2\lambda f=0$ on the interval $(a,b)$. This can be solved as $$f(x) = e^{-\mu x} \big( c_1 e^{\sqrt{\mu^2+2\lambda}\;x} +c_2e^{-\sqrt{\mu^2+2\lambda}\;x} \big),$$where $c_1,c_2$ may be determined by the boundary conditions $f(a)=f(b)=1$.
Best Answer
Yes you can compute the distribution of the last hitting time.
Assume $\mu,a>0$ so the last hitting time is a.s. finite. Basically let $B_t = tW_{1/t}$. which is also a brownian motion. This time inversion allows us to "convert" the last hitting time into a first hitting time.
Specifically, if $t_a = \sup\{t \ge 0 : \mu t + \sigma W_t \le a\}$ then $t_a^{-1} = \inf\{u \ge 0: au-\sigma B_u \ge \mu\}$. And the latter is something whose distribution you know how to compute, because it is a first hitting time.