## Markov Chain Conditional Expectation

Hello, in relation to Markov chains, could you please clarify the following equations:

In particular, could you please expand on why the first line is equal. Surely from $\100dpi \mathbb{P}(A)=\mathbb{E}[\mathbf{1}_A(\omega )]$, along with the first equation, this implies that:

I just don't see why they are all equal. Please could you provide some intuition on this. Thanks