[step:Extend the formula from a prefix path to a one-step longer path]Assume that the formula holds for some $m \ge 0$. Fix states $i_0,\ldots,i_m,i_{m+1} \in S$. Since each $X_r:(\Omega,\mathcal F)\to(S,\mathcal P(S))$ is measurable, the following cylinder events belong to $\mathcal F$. Define the prefix event $A_m \in \mathcal F$ by
\begin{align*}
A_m=\{X_0=i_0, X_1=i_1,\ldots,X_m=i_m\},
\end{align*}
and define the extended path event $A_{m+1} \in \mathcal F$ by
\begin{align*}
A_{m+1}=\{X_0=i_0, X_1=i_1,\ldots,X_m=i_m,X_{m+1}=i_{m+1}\}.
\end{align*}
If $\mathbb P(A_m)=0$, then $A_{m+1}\subset A_m$, so $\mathbb P(A_{m+1})=0$. By the induction hypothesis,
\begin{align*}
\mathbb P(A_m)=\lambda_{i_0}\prod_{r=0}^{m-1}p_{i_r i_{r+1}},
\end{align*}
and therefore
\begin{align*}
\lambda_{i_0}\prod_{r=0}^{m}p_{i_r i_{r+1}}=\mathbb P(A_m)p_{i_m i_{m+1}}=0.
\end{align*}
Thus the desired identity holds in this case.
Now suppose $\mathbb P(A_m)>0$. By the definition of conditional probability applied to the event $A_m$ and the event $\{X_{m+1}=i_{m+1}\}$,
\begin{align*}
\mathbb P(A_{m+1})=\mathbb P(A_m)\mathbb P(X_{m+1}=i_{m+1}\mid A_m).
\end{align*}
Since $A_m$ is the history event $\{X_0=i_0,\ldots,X_m=i_m\}$ and has positive probability, the Markov property in the time-homogeneous form stated above gives
\begin{align*}
\mathbb P(X_{m+1}=i_{m+1}\mid A_m)=p_{i_m i_{m+1}}.
\end{align*}
Equivalently, because $A_m\subset\{X_m=i_m\}$ and $\mathbb P(A_m)>0$, the event $\{X_m=i_m\}$ also has positive probability, so this is the same one-step transition probability from state $i_m$ to state $i_{m+1}$. Using the induction hypothesis for $\mathbb P(A_m)$, we obtain
\begin{align*}
\mathbb P(A_{m+1})=\left(\lambda_{i_0}\prod_{r=0}^{m-1}p_{i_r i_{r+1}}\right)p_{i_m i_{m+1}}.
\end{align*}
Hence
\begin{align*}
\mathbb P(A_{m+1})=\lambda_{i_0}\prod_{r=0}^{m}p_{i_r i_{r+1}}.
\end{align*}[/step]