I understand how you get from 1st to 2nd line but i don't get how the two terms are generated in the first line. I looked up Conditional Expectations but i still couldn't make sense of this.
Thank you.

![conditional expectation](https://i.stack.imgur.com/4qxeG.jpg)

provenance...

![part 1](https://i.stack.imgur.com/BsCpg.jpg)
![part 2](https://i.stack.imgur.com/s5LAq.jpg)