$\newcommand{\intr}[2]{\overline{#1,#2}}$
The desired result follows immediately from 

>**Theorem** 

>	(I) If $a_1=1$, then $a_j=1$ for all $j\in\intr1\infty$. 

>	(II) If $a_1<1$, then $S_\infty<\infty$ and $a_j=(S_\infty-S_j)(1-a_1)$ for all $j\in\intr1\infty$, where 
\begin{equation*}
	S_j:=\sum_{i=1}^j s_i,\quad s_j:=r_{j-1}\cdots r_1,\quad r_j:=q_j/p_j, \quad
	p_j:=\frac{\lambda_j}{\lambda_j+\mu_j},\quad q_j:=1-p_j. 
\end{equation*}

*Proof* Consider the embedded discrete-time Markov chain $(Y_t)_{t\in\intr0\infty}$, with state space $\intr0\infty$ and transition probabilities $P(Y_{t+1}=j+1|Y_t=j)=p_j=1-P(Y_{t+1}=j-1|Y_t=j)$ for $j\in\intr1\infty$ and $P(Y_{t+1}=0|Y_t=0)=1$, for all $t\in\intr0\infty$. Then the probabilities of the absorption (at $0$) for the embedded chain are the same $a_j$'s, as for the original birth-and-death process. 

The key observation is the following simple one: Fix any $j\in\intr0\infty$. For any natural $N\ge j$, let $a^N_j$ denote the conditional probability that the embedded chain reaches the state $0$ before it reaches the state $N$ given that the chain starts in state $j$. Then, by the continuity of probability theorem ([Theorem 10.2][1]),  
\begin{equation}
	\text{$a^N_j\to a_j$.}\tag{0}
\end{equation}
Everywhere here, the convergence is as $N\to\infty$. 

Let us now compute $a^N_j$. We have 
\begin{equation*}
	a^N_0=1,\quad a^N_N=0,\quad a^N_j=p_ja^N_{j+1}+q_ja^N_{j-1}\ \forall j\in\intr1{N-1}. 
\end{equation*}
The latter equality can be rewritten as $h^N_{j+1}=r_jh^N_j$, where 
\begin{equation*}
	h^N_j:=a^N_{j-1}-a^N_j, 
\end{equation*}
whence 
\begin{equation*}
	h^N_j=r_{j-1}\cdots r_1h^N_1=s_jh^N_1\tag{0.5}
\end{equation*}
and, further, 
\begin{equation*}
	a^N_j=\sum_{i=j+1}^Nh^N_i=\sum_{i=j+1}^Ns_ih^N_1=(S_N-S_j)(1-a^N_1) \tag{1}
\end{equation*}
for all $j\in\intr0N$. In particular, for $j=0$ formula (1) yields 
\begin{equation*}
	1=S_N(1-a^N_1). 
\end{equation*}
So, by (0), 
\begin{equation}
	a_1=1\iff S_\infty=\infty. \tag{2}
\end{equation}

Now consider the following two cases: 

*Case I: $a_1=1$. Then $a^N_1\to1$, $h^N_1\to0$, and hence, by (0.5), $h^N_j\to0$ for all $j\in\intr1\infty$. So, 
$a^N_j=1-\sum_{i=1}^j h^N_i\to1$ and hence $a_j=1$ for all $j\in\intr1\infty$. This proves part (I) of the theorem. 

*Case II: $a_1<1$. Then part (II) of the theorem follows immediately from (2), (1), and (0).  

[1]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwiuzc6v5cDlAhUrnq0KHVksA0YQFjACegQIABAC&url=http%3A%2F%2Fstat.math.uregina.ca%2F~kozdron%2FTeaching%2FRegina%2F451Fall13%2FHandouts%2F451lecture10.pdf&usg=AOvVaw2jfikxL6LCt8zFOTpPJsYR