Density of running supremum of Brownian motion until a stopping time I am stuck on an exercise in my book:
The question relies on the following fact:

Let $M$ be a continuous, non-negative local martingale such that $M_0=1$ and $M_t \rightarrow 0$ almost surely as $ t \rightarrow \infty$. Then, for each $a>1$,
$$ \mathbb{P} \bigg( \sup_{t \geq 0} M_t > a \bigg) = \frac{1}{a}. $$

It asks us to find the density of

(i) $\, \sup_{0 \leq t \leq \tau(-b)} W_t$, $\quad $where $\tau(-b) = \inf \{t \geq 0 \, | \, W_t < -b \}$ and  $b>0$.
(ii) $\sup_{t \geq 0} (W_t - \lambda t),$ $ \quad $ for $\lambda >0$.

My main problem is how to associate $W_t$ to a continuous local martingale $M$ satisfying the aforementioned properties. The Doolean exponential $M_t := \exp \{ W_t - \frac{t}{2} \}$ does not work.
 A: Part (i): Use $$M_t := \frac{W_{t \wedge \tau(-b)} + b}{b}.$$
How to come up with this choice? Well, we are interested in $$\sup_{0 \leq t \leq \tau(-b)} W_t = \sup_{t \geq 0} W_{t \wedge \tau(-b)}.$$ We know that $(W_{t \wedge \tau(-b)})_{t \geq 0}$ is a martingale and that $W_{t \wedge \tau(-b)} \to -b$ as $t \to \infty$. This means that, in order to get a martingale $(M_t)_{t \geq 0}$ satisfying the assumption $M_t \to 0$ as $t \to \infty$, we have to shift the process. Adding $b$ yields a new martingale
$$\tilde{M}_t := W_{t \wedge \tau(-b)} +b \to 0 \qquad \text{as $t \to \infty$}.$$
By the definition of $\tau(-b)$, we have $\tilde{M}_t \geq 0$, i.e. $(\tilde{M}_t)_{t \geq 0}$ satisfies all the assumptions except $\tilde{M}_0=1$. Scaling the martingale with the factor $\frac{1}{b}$, we are done.
Part (ii): Consider the martingale $$M_t := \exp \left( \lambda W_t - \frac{\lambda^2}{t} \right) = \exp \left( \lambda \left[ W_t - \frac{\lambda}{2} t \right] \right).$$ (See also this question and this question.)
