A simple random walk is a type of Markov Chain defined as:
$$X_n = \sum \limits^{i=1}_{n} Z_i~~~n=1,2,3,\cdots$$
where:
$$\begin{aligned}X_0 &= 0 \\\\ Z_i &\sim \text{Bernoulli}(n,p) \\\\ Z_i &\sim IID\\\\ P_Z(z) &= \begin{cases}p & Z_i=1 \\\\ q=1-p & Z_i=-1\end{cases}\end{aligned}$$
Find the "one step transition probability" defined as:
$$p_{ij} = \Pr\Big[X_n=j ~| ~X_{n-1}=i \Big]$$
The textbook says the answer is:
$$p_{ij} = \Pr\Big[X_n=j ~| ~X_{n-1}=i \Big] = \begin{cases}p & j=i+1 \\ q=1-p & j=i-1\end{cases}$$
which is the same as:
$$\Pr(X_n=i+1~|~X_{n-1}=i) = ~?$$
$$\Pr(X_n=i-1~|~X_{n-1}=i) = ~?$$
$$X_n = X_{n-1} + Z_n$$
--
$$\begin{aligned}\Pr(X_n=i+1~ |~ X_{n-1} = i)&\\&=\Pr(X_{n-1} + Z_m =i+1 ~|~ X_{n-1} = i)\\&=\Pr(i + Z_m = i+1)\\&=\Pr(Z_m = 1) = p\end{aligned}$$
$$\begin{aligned}\Pr(X_n=i-1 ~|~ X_{n-1} = i)&\\&=\Pr(X_{n-1} + Z_m =i-1 ~|~ X_{n-1} = i)\\&=\Pr(i + Z_m = i-1)\\&=\Pr(Z_m = -1) = q = 1 - p\end{aligned}$$