How is the law of total probability used in deriving absorption probabilities? In this online book in this link under absorption probabilities:
https://www.probabilitycourse.com/chapter11/11_2_5_using_the_law_of_total_probability_with_recursion.php

How explicitly is the law of total probability used to get $$a_i
 = \sum_ka_kp_{ik}$$

This seems to show that $$P(\text{absorption in 0 | $X_0 = i$}) = \sum_k P(\text{absorption in 0 | $X_0 = k$})*P(X_1 = k | X_0 = i)$$
Under normal total probability $$P(A) = \sum_k P(A|B_k)P(B_k)$$ where $B_k$ is a member of the partition of the sample space.
What is the sample space here?  What is the partition? 
It seems like $$A=(\text{absorption in 0 | $X_0=i$}) \text{ and } B_k = (X_1=k | X_0=i)$$ but then we would have $$A|B_k = \biggl(\text{absorption in 0 | $X_0=i $}\biggr) \space\text{$|$}\space \biggl(X_1=k | X_0=i \biggr)$$ which I don't see how reduces to
$$P(\text{absorption in 0 | $X_0 = k$})$$
 A: Let $A_0=\{\text{absobtion in 0}\}$. Then
\begin{align}
\mathsf{P}(A_0\mid X_0=i)&=\frac{\mathsf{P}(A_0, X_0=i)}{\mathsf{P}(X_0=i)} \\
&=\sum_k \frac{\mathsf{P}(A_0, X_0=i,X_1=k)}{\mathsf{P}(X_0=i)} \\
&=\sum_k \mathsf{P}(A_0\mid X_1=k, X_0=i)\mathsf{P}(X_1=k\mid X_0=i) \\
&=\sum_k \mathsf{P}(A_0\mid X_1=k)\mathsf{P}(X_1=k\mid X_0=i),
\end{align}
where the 4th line follows from the Markov property. Namely, let $\tau_0:=\inf\{n\ge 1:X_n=0\}$. Then $A_0=\{\tau_0<\infty\}$ and
\begin{align}
\mathsf{P}(A_0\mid X_1=k,X_0=i)&=\sum_{n\ge 1}\mathsf{P}(\tau_0=n\mid X_1=k,X_0=i) \\
&=\sum_{n\ge 1}\mathsf{P}(X_n=0,X_{n-1}\ne 0,\ldots\mid X_1=k,X_0=i) \\
&=\sum_{n\ge 1}\mathsf{P}(X_n=0,X_{n-1}\ne 0,\ldots\mid X_1=k) \\
&=\mathsf{P}(A_0\mid X_1=k),
\end{align}
where the 3rd line follows form the Markov property (sometimes it's called the Extended Markov property, i.e. $\{X_n,X_{n+1},\ldots\}$ is conditionally independent on $\{X_0,\ldots, X_{n-1}\}$ given $X_n$. See, for example, Theorem 4.1.5 in these notes).
