I am reading Notes on Markov Chain.
Consider a Markov chain $(Z_n)_{n=1}^\infty$ with state space $S$ and let $A\subseteq S.$ Define $$T_A = \inf\{n\geq 0: Z_n\in A\}.$$ Mean hitting time is defined by $$h_A(k) = \mathbb{E}[T_A\mid Z_0 = k].$$ At page $152,$ the author stated the following.
$$\mathbb{E}[T_A\mid Z_0=k] = \sum_{\ell\in S} \mathbb{E}[T_A \mathbb{1}_{\{Z_1 = \ell\}} \mid Z_0=k].$$
I do not understand why the equality holds. I think it is due to the law of total expectation, but I am not sure how it is applied here. Any hint would be appreciated.
\begin{align*} E_k T_A = E_k \left(T_A \sum_{\ell \in S} \textbf{1}_{\{Z_1 = \ell\}}\right) = \sum_{\ell \in S}E_k T_A \textbf{1}_{\{Z_1 = \ell\}}, \end{align*} where $E_k$ is shorthand for expectation with respect to the probability measure on strings starting with $X_0 = k$.