We have a biased 1-dimensional random walk on the number line. Each timestep, with probability $p$ such that $0<p<1$, it increments by $1$, otherwise it decrements by $1$. Conditioning on the fact that the random walk hit $-a$ before hitting $b$, we want to know the expected number of steps till it hit $-a$ (when starting at $0$).
From https://en.wikipedia.org/wiki/Random_walk#One-dimensional_random_walk, I know that the expected number of steps till an unbiased random walk (i.e. $p=\frac{1}{2}$) hits either $-a$ or $b$ is $ab$. But how to derive for hitting just one side, and for biased random walks?
Maybe you can use stuff like discrete Laplacian?
Let $f(x)$ be the expectation of $\tau_{-a}$ conditioned on the event $\tau_{-a}<\tau_b$ with the biased walk starting from $x$, then we have $f(-a)=f(b)=0$ and for all $-a<i<b$, $p(1+f(i+1)-f(i))+(1-p)(1+f(i)-f(i-1))=0$.
Calculate the product of the left and right hand side, we get $1+f(i+1)-f(i)=(-\frac{1-p}{p})^(i+a) \dot (1+f(-a+1))$.
Then sum over I and use $f(b)=0$ to get the value of $f(-a+1)$.
I didn't calculate the rest of this method. Maybe it will work ;P