In the binomial replacement branching model with generating function $P(s)=q+ps$, let $N=\text{inf}\{n:X_{n}=0\}$ where $X_{n}$ is a random variable.
(a) Find the probability $P[N=n]$ for $n \geq 1$.
(b) Find the probability $P[N=n]$ for $X_{0} = j > 0$.
I honestly, don't know how to related the generated function with the given question. Can someone help me find the relation?
I agree with @NCh when he says that the context of your question is not clear, you do not define that it is a branching process, however, I do understand what your question refers to, but before solving your problem let us remember that it is a Branching process.
Note that every branching process is determined by the generating function $P(s):=\sum_{k=0}^{\infty}p_{k}s^{k}$. Furthermore, note that the generating function of $X_{1}=X_{1,1}$ is $P(s)$.
In our case, we have $P(s)=q+ps$, then we can conclude that $X_{n,i}$ has Bernoulli distribution with $\mathbb{P}(X_{n,j}=1)=p=1-q=1-\mathbb{P}(X_{n,j}=0)$ for each $n\geq 1$ and $j\geq 1$. Note that it must have $p+q=1$, you should have said it in your post.
The solution of (a): Note that if $X_{k-1}=m$, then $X_{k}\in\{0,1,2,\ldots,m\}$. Therefore, due to the latter and the fact that $X_{0}=1$ we have the following \begin{align} \mathbb{P}(T=n) &=\mathbb{P}(X_{1}\neq 0,X_{2}\neq 0,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ &= \mathbb{P}(X_{1,1}= 1,X_{2}\neq 0,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ &= \mathbb{P}(X_{1,1}= 1,X_{2,1}= 1,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ &\vdots \\ &= \mathbb{P}(X_{1,1}= 1,X_{2,1}= 1,\ldots,X_{n-2,1}= 1,X_{n-1}\neq 0,X_{n}= 0)\\ &=\mathbb{P}(X_{1,1}= 1,X_{2,1}= 1,\ldots,X_{n-2,1}=1,X_{n-1,1}=1,X_{n}= 0)\\ &=\mathbb{P}(X_{1,1}= 1,X_{2,1}= 1,\ldots,X_{n-2,1}=1,X_{n-1,1}=1,X_{n,1}= 0)\\ &=\mathbb{P}(X_{1,1}= 1)\mathbb{P}(X_{2,1}= 1)\ldots\mathbb{P}(X_{n-2,1}=1)\mathbb{P}(X_{n-1,1}=1)\mathbb{P}(X_{n,1}= 0)\\ &=p^{n-1}q. \end{align}
The solution of (b): In this case we must assume $X_{0}=j>0$, we assume that $j$ is a non-negative integer, otherwise the problem would not make sense. The fact $X_{0}=j>0$ implies that $X_{1}=X_{1,1}+\cdots+X_{1,j}$, to make the pleasant notation I define the random variable $B_{s}^{t}$ given by $$ B_{s}^{t}:=X_{s,1}+\cdots+X_{s,t}. $$ Note that $B_{s}^{t}$ has Binomial distribution with parameters $p$ and $t$, that is, $\mathbb{P}(B_{s}^{t}=r)=\binom{t}{r}p^{r}q^{t-r}$. Furthermore, we have that if $s_{1}\neq s_{2}$ then $B_{s_{1}}^{t_{1}}$ is indepnedent of $B_{s_{2}}^{t_{2}}$ for all $t_{1},t_{2}\in\mathbb{N}$. Also, note tha $B_{1}^{j}=X_{1}$ since $X_{0}=j$.
We are ready to present the solution:
$$ \begin{array}{rl} \mathbb{P}(T=n)=& \mathbb{P}(X_{1}\neq 0,X_{2}\neq 0,X_{3}\neq 0,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ =& {\displaystyle\sum_{k_{1}=1}^{j}}\mathbb{P}(X_{1}=k_{1},X_{2}\neq 0,X_{3}\neq 0,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ =& {\displaystyle\sum_{k_{1}=1}^{j}}\mathbb{P}(X_{1}=k_{1})\mathbb{P}(X_{2,1}+\cdots+X_{2,k_{1}}\neq 0,X_{3}\neq 0,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ =&{\displaystyle\sum_{k_{1}=1}^{j}}\mathbb{P}(B_{1}^{j}=k_{1}){\displaystyle\sum_{k_{2}=1}^{k_{1}}}\mathbb{P}(X_{2,1}+\cdots+X_{2,k_{1}}= k_{2},X_{3}\neq 0,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ =&{\displaystyle\sum_{k_{1}=1}^{j}}\mathbb{P}(B_{1}^{j}=k_{1}){\displaystyle\sum_{k_{2}=1}^{k_{1}}}\mathbb{P}(B_{2}^{k_{1}}= k_{2})\mathbb{P}(X_{3,1}+\cdots+X_{3,k_{2}}\neq 0,\ldots,X_{n-2}\neq 0,X_{n-1}\neq 0,X_{n}= 0)\\ \vdots& \\ =&{\displaystyle\sum_{k_{1}=1}^{j}}\mathbb{P}(B_{1}^{j}=k_{1}){\displaystyle\sum_{k_{2}=1}^{k_{1}}}\mathbb{P}(B_{2}^{k_{1}}= k_{2})\cdots{\displaystyle\sum_{k_{n-2}=1}^{k_{n-3}}}\mathbb{P}(B_{n-2}^{k_{n-3}}= k_{n-2}){\displaystyle\sum_{k_{n-2}=1}^{k_{n-1}}}\mathbb{P}(B_{n-1}^{k_{n-2}}= k_{n-1})\mathbb{P}(B_{n}^{k_{n-1}}=0) \\ =& {\displaystyle\sum_{k_{1}=1}^{j}}\binom{j}{k_{1}}p^{k_{1}}q^{i-k_{1}}{\displaystyle\sum_{k_{2}=1}^{k_{1}}}\binom{k_{1}}{k_{2}}p^{k_{2}}q^{k_{1}-k_{2}}\cdots{\displaystyle\sum_{k_{n-2}=1}^{k_{n-3}}}\binom{k_{n-3}}{k_{n-2}}p^{k_{n-2}}q^{k_{n-3}-k_{n-2}}{\displaystyle\sum_{k_{n-1}=1}^{k_{n-2}}}\binom{k_{n-2}}{k_{n-1}}p^{k_{n-1}}q^{k_{n-2}-k_{n-1}}\binom{k_{n-1}}{0}p^{0}q^{k_{n-1}}\\ =& q^{j}{\displaystyle\sum_{k_{1}=1}^{j}}\binom{j}{k_{1}}p^{k_{1}}{\displaystyle\sum_{k_{2}=1}^{k_{1}}}\binom{k_{1}}{k_{2}}p^{k_{2}}\cdots{\displaystyle\sum_{k_{n-2}=1}^{k_{n-3}}}\binom{k_{n-3}}{k_{n-2}}p^{k_{n-2}}{\displaystyle\sum_{k_{n-1}=1}^{k_{n-2}}}\binom{k_{n-2}}{k_{n-1}}p^{k_{n-1}}\\ & \qquad\qquad\color{red}{\mbox{we remember that } \sum_{k=1}^{m}\binom{m}{k}x^{k}=(1+x)^{m}-1}\\ =& q^{j}{\displaystyle\sum_{k_{1}=1}^{j}}\binom{j}{k_{1}}p^{k_{1}}{\displaystyle\sum_{k_{2}=1}^{k_{1}}}\binom{k_{1}}{k_{2}}p^{k_{2}}\cdots{\displaystyle\sum_{k_{n-2}=1}^{k_{n-3}}}\binom{k_{n-3}}{k_{n-2}}p^{k_{n-2}}[(1+p)^{k_{n-2}}-1]\\ =& q^{j}{\displaystyle\sum_{k_{1}=1}^{j}}\binom{j}{k_{1}}p^{k_{1}}{\displaystyle\sum_{k_{2}=1}^{k_{1}}}\binom{k_{1}}{k_{2}}p^{k_{2}}\cdots{\displaystyle\sum_{k_{n-3}=1}^{k_{n-4}}}\binom{k_{n-4}}{k_{n-3}}p^{k_{n-3}}[(1+p(1+p))^{k_{n-3}}-(1+p)^{k_{n-3}}]\\ =& q^{j}{\displaystyle\sum_{k_{1}=1}^{j}}\binom{j}{k_{1}}p^{k_{1}}{\displaystyle\sum_{k_{2}=1}^{k_{1}}}\binom{k_{1}}{k_{2}}p^{k_{2}}\cdots{\displaystyle\sum_{k_{n-4}=1}^{k_{n-5}}}\binom{k_{n-5}}{k_{n-4}}p^{k_{n-4}}[(1+p(1+p(1+p)))^{k_{n-4}}-(1+p(1+p))^{k_{n-4}}]\\ \vdots& \\ =& q^{j} \left[\underset{\color{red}{n-1\mbox{ occurrences of }p} }{\underbrace{(1+p(1+p(1+\cdots+p(1+p(1+p}}))\cdots)))^{j}-\underset{\color{red}{n-2\mbox{ occurrences of }p} }{\underbrace{(1+p(1+p(1+\cdots+p(1+p(1+p}}))\cdots)))^{j}\right]\\ &\qquad \color{red}{\mbox{Note that }\underset{\color{red}{m\mbox{ occurrences of }p} }{\underbrace{(1+p(1+p(1+\cdots+p(1+p(1+p}}))\cdots)))=p^{m}+p^{m-1}+\cdots+p+1 } \\ =& q^{j}[ (p^{n-1}+p^{n-2}+\cdots +p+1)^{j}-(p^{n-2}+p^{n-2}+\cdots +p+1)^{j}] \\ =& q^{j}\left[ \left(\frac{1-p^{n}}{1-p}\right)^{j} - \left(\frac{1-p^{n-1}}{1-p}\right)^{j} \right]. \end{array} $$