I don't understand the last part. How do we get $p_{k+1}$ and $p_{k-1}$? I understand it intuitively but I'm have trouble writing things down. It seems like we define $\tau$ as
$$\tau :=\min\left\{t\ge 0:X_t=0\text{ or } X_t = n\right\}$$
And I think $p_k$ is
$$\mathbb{P}\left\{X_\tau=n \mid X_0=k \right\}$$
Let $\Delta_i$'s be Bernoulli with $p=0.5$. I have
\begin{align*} \mathbb{P}\left\{ X_\tau = n\mid X_0=k\right\}&= \frac{1}{2} \mathbb{P}\left\{ X_\tau=n \mid X_1 = k+1\right\} +\frac{1}{2} \mathbb{P}\left\{ X_\tau=n \mid X_1 = k-1\right\} \end{align*}
But not the quesiton is, why is it true that
$$\mathbb{P}\left\{ X_\tau=n \mid X_1 = k+1\right\}=\mathbb{P}\left\{ X_\tau = n\mid X_0 = k+1\right\}\,?$$

Note that at a certain step $p_k$, by definition, represent the probability that the gambler reach fortune $n$ with $k$ dollars, thus since at the next step we have only two possibilities:
for the law of total probability we have
$$p_k=\frac12 p_{k-1}+\frac12 p_{k+1}$$