Suppose that $S_n$ is a symmetric random walk on $\mathbb{Z}$ and $a,b$ are some integers. Moreover, let $\tau$ be the first time the walk arrives to $b$ or $-a$. I would like to compute the expected value of $\tau$ given that we arrived to $b$ before we arrived to $-a$.
I started by assigning a random variable $\tau_c$ for every integer $c$ where:
$$\tau_c =\min\{n|S_n=c\}$$
Now, we get that $\tau=\min\{\tau_b,\tau_{-a}\}$. Moreover:
$$E[\tau\ |\ \tau_{b}<\tau_{-a}]=\frac{E[\tau\cdot1_{\{\tau_{b}<\tau_{-a}\}}]}{P(\tau_{b}<\tau_{-a})}$$
Using the martingale $S_n$ and Doob's optimal stopping theorem, I found out that:
$$P(\tau_b<\tau_a)=\frac{a}{a+b}$$
However, I can't go any further than that... I was told to consider the martingale $M_n=S_n^3-3nS_n$.
Hints will be appreciated!
[Presumably $a>0$.]
The martingale $M$ is a good choice!
As a start, it's well known that $E[\tau] = ab$. Momentarily abbreviate $q=P[\tau_b<\tau_{-a}]=a/(a+b)$ and $k=E[\tau\cdot 1_{\{\tau_b<\tau_{-a}\}}]$. Then, by Optional Stopping, $$ 0=E[M_\tau] = -a^3(1-q)+b^3q-3bk+3a(ab-k). $$