Random walks : Hitting and recurrence Times relation I have trouble understanding that how $$E\left[T_0|X_{0} = 0\right] = 1 + E[H_0|X_0=1] $$ where $T_0 = \inf\{n \geq 1:X_n = 0 \}$ and $H_A =\inf\{ n\geq 0: X_n \in A  \}$. In other words $T_0$ is the first recurrent time and $H_0$ is the first hitting time.
 A: Assume that the random walk is defined as
$$
X_n  = \sum_{k = 1} ^ n \xi_k
$$where $(\xi_a)_{a\ge 1}$ are iid and such as $P(\xi_1 = \pm 1) = 1/2$.

$$1_{T_0 = m,X_0=0} = 1_{T_0 = m,X_0=0, X_1 = 1}+  1_{T_0 = m,X_0=0, X_1 = -1}
$$
Now using the Markov property, and as $T_0$ depends in a deterministic way
on $(X_a)_{a\ge 1}$, you get
$$
T_0 |(X_0=a, X_1 = b) = T_0 |X_0=a
$$
and in particular the following red equality in
$$\begin{align}
E[T_0|X_0 = 0] &= \sum_{m \ge 1} m P(T_0 = m | X_0 = 0) \\
&= \sum_{m \ge 1} m \sum_{e = \pm 1} P(T_0 = m, X_1 = e | X_0 = 0) \\
&= \sum_{m \ge 1} m \sum_{e = \pm 1} P(T_0 = m| X_1 = e, X_0 = 0)P(X_1 = e)\\
&\color{red}{=} 
\sum_{m \ge 1} m \sum_{e = \pm 1} P(T_0 = m| X_1 = e)P(X_1 = e)\\
&= \sum_{e = \pm 1} \sum_{m \ge 1} m P(T_0 = m| X_1 = e)P(X_1 = e)\\
&= \sum_{e = \pm 1} E[T_0|X_1 = e]P(X_1 = e)
\end{align}$$
Using the symetry you get:
$$
= \sum_{e = \pm 1} E[T_0|X_1 = e] \frac 12 = E[T_0|X_1 = 1] 
$$
Using the definition of $T_A:$
$$
T_0|(X_1 = 1) = (1 + T_0) | (X_0 = 1) 
$$
and the previous equality becomes:
$$
= 1 + E[T_0|X_0 = 1] 
$$
