Let $(X,\mathcal{A}, \mu, T)$ be a measure preserving system and $\mathcal{B}$ be a sub-sigma algebra of $\mathcal{A}$. Show that $$E(f|\mathcal{B})= E(f\circ T|T^{-1}\mathcal{B}).$$
My attempt:
We have $$\int_{T^{-1}B}f\circ T\:d\mu= \int_{T^{-1}B}E(f\circ T|T^{-1}\mathcal{B})\:d\mu\quad \text{for all }B\in \mathcal{B},$$ and $$\int_{B}f\:d\mu= \int_{B}E(f|\mathcal{B})\:d\mu \quad \text{for all }B\in \mathcal{B}.$$ As $\mu$ is $T$-invariant, we have $$\int_Bf\:d\mu=\int_{T^{-1}B}f\circ T\:d\mu.$$ Therefore $$\int_{T^{-1}B}E(f\circ T|T^{-1}\mathcal{B})\:d\mu=\int_{B}E(f|\mathcal{B})\:d\mu \quad \text{for all }B\in \mathcal{B}.$$ Please give me some hint on how to proceed.

This is not true. If $f=I_B$ with $B \in \mathcal B$ the LHS is $I_B$ and RHS is $I_{T^{-1}B}$. The stated result is true if $f$ is $T-$ invariant: i.e. $f\circ T=f$ a.e..