Let $c, d \in \mathbb{Z}$ be such that $c < 0 < d$. Let $\tau_k = \inf_{n \geq 0} \left\{n: S_n = k\right\}$ be the first hitting time of state $k$, where $S_n$ denotes the position of a symmetric random walk on $\mathbb{Z}$ after $n$ steps. The question is to show that $\mathbb{P}(\tau_D < \tau_C) = \frac{-c}{d-c}$. The random walk starts at position $0$ at time $0$.
I have been beating my head on this for a little bit, and I suspect it is a lot simpler than I am thinking. I played around with finding the probability of $\tau_A = n$ but wasn't able to use that to find the answer to the question. Any suggestions?
Hint: Let $\tau=\min(\tau_C,\tau_D)$. By Wald's equation, $E[S_\tau]=0$. On the other hand, $S_\tau$ is equal to either $d$ or $c$, according to whether $\tau_C$ is less than or more than $\tau_D$.
There is the hairy detail that in order to use Wald's equation, you need to show that $E[\tau]<\infty$. To prove this, note that if $X_i=1$ for $d-c$ steps in a row at any point, then the process will leave the interval $[c,d]$ if it has not already. This shows that $P(\tau>(d-c)k)\le (1-\frac1{2^{d-c}})^k$. This bound on the tail probabilities of $\tau$ can be used to show $E[\tau]$ is finite.