Let $T_k$ be the total cumulative time spent in state $i$ before reaching state $i+1$ in a continuous time birth-death process, with birth and death rates $\lambda_k$ and $\mu_k$. What is the distribution of $T_k$? To solve this problem, I tried to set up the equation:
$P(T_k < z) = \sum_{n=0}^\infty P(T_k< z | N_k=n)*P(N_k=n)$
But, I ran into a problem calculating both $P(N_k=n)$, which should be geometrically distributed with $p=1-\rho_{k,k}$, where $\rho_{k,k}$ is the probability of returning to state k from state k in finite time. $P(T_k< z | N_k=n)$ having a gamma distribution also seems to complicate the problem.