Suppose we have a simple random walk $ X_{n} $ and let $ f $ be the generating function of $ T_{0} = \min \{n \geqslant 0: X_{n} = 0 \} $ starting at $1$, that is $f(x)=\mathbb{E}_{1}(x^{T_{0}}):=\mathbb{E}(x^{T_{0}}|X_{0}=1)$.
I must prove that $\mathbb{E}_{2}(x^{T_{0}})=f(x)^{2}$. I have tried to decompose: $$\mathbb{E}_{2}(x^{T_{0}})=\sum_{k=0}^{\infty} P_{2}(T_{0}=k)x^{k}$$ and work the term $P_{2}(T_{0}=k)=\mathbb{E}_{2}(1_{ \{ T_{0}=k\} })=\mathbb{E}_{2}(1_{ \{ T_{1}\leqslant k-1 \} } 1_{ \{ T_{0}=k\} })$ where $T_{1}:=\min\{n\geqslant 0: X_{n}=1 \}$ because if $T_{0}=k$ then we will get to $1$ in at most in $k-1$ steps. I do not know if it is a good idea, it occurs to me that at some point I must apply the strong Markov property. I would appreciate any help
This is a very important question towards one's understanding of Markov chains in general. I thus only give some hints. Figuring it out yourself will be very helpful.
$T_0$ is the hitting time of $0$. Consider any path from $2$ to $0$. Maybe it's $(2, 3, 4, 3, 4, 3, 2, 1, 2, 1, 0)$. Quite trivially, any such path passes through $1$. Apply the Strong Markov Property at the stopping time $T_1 := \inf\{n \ge 0 \mid X_n = 1\}$. Decompose the interval $(0, T_0]$ into $(0, T_1] \cup (T_1, T_0]$ and consider the two parts separately.