Expected number steps in a Birth and Death Chain I've been working on this problem for several days now, and I'm completely stuck on what to do next.  Here's the problem:
Consider a birth-and-death chain $X_t$ on $S = \{0, 1, 2, . . .\}$ with the following
transition probabilities: $p(0, 1) = 1$, and $p(j, j + 1) = p$ and $p(j, j − 1) = 1-p$ for $p \in \left(0,\frac{1}{2}\right)$.
Let $T = \min\{t \geq 0 \: | \: X_t=0\}$ and define $\phi(j) = E(T|X_0=j)$.  Find $\phi(1)$.
The hint that came with the problem suggested the following: Let $N$ be the number of excursions to the right of state $1$ before the first visit to state $0$.  Find the p.m.f of $N$ and $E(N)$.
Then prove that $\phi(1)=1+E(N)(\phi(1)+1)$.
So, I've concluded that $N-1 \sim \text{Geometric}(1-p)$. which would give me $E(N) = \frac{2-p}{1-p}$.  However, I have no idea how $\phi(1) = 1+\frac{2-p}{1-p}(\phi(1)+1)$.
It kind of looks like Wald's equation could be used here, but I dont see how it could be.
Any help would be appreciated.
 A: Consider the path $(X_t)_{t=0}^T$, ie the path of $X$ from $0$ to $1$.
Every time the walk is at $1$, but then moves to $2$, it needs to get back to $1$ before hitting $0$. So we break up this path into excursions from $1$:

*

*if the excursion from $1$ goes to $0$, then the path stops;

*otherwise, we need to wait for the path to get back to $1$.

There will be $N$ excursions going to $2$, rather than $0$, by definition of $N$.
How long are these excusions in expectation? Well, it is the time to get from $2$ to $1$, plus the one step from $1$ to $2$ taken at the very start of the excursion.
Now here is the clever part: the time from $2$ to $1$ has exactly the same distribution as from $1$ to $0$. Indeed, it is just a translation of the space and all the probabilities are unchanged. So the expected time is just $\phi(1)$ again!---plus, of course, the $1$ from the initial step.
Next we need independence: the lengths of the excursions are independent of the number, eg by the Markov property.
Finally, the final excursion $1 \to 0$ takes length $1$.
All this combined gives your required relation!
