I am trying to solve the above question. We start from $X_0 = 1 $. Since we only conditioning on the first step, so $X_1$ is either $2$ or $0$.
For $X_1=0$, we will have $E(Z^1) = z$ and for $X_1=2$, we have $E(Z^{1+T'})$ = $z G(Z)$
So we will have $G(Z) = z(1-p) + zG(z)p $
Can anyone tell me what did i do wrong or explain what make $pzG(z)^2 - G(z) + (1-p)z$ in the question?
Thanks
