$f$ is a measurable mapping on $(X,\mu)$, and is measure-preserving, i.e. for all measurable set $E$ , $\mu (f^{-1}(E))=\mu(E)$. There is a measurable set $A$,s.t. $f^{-1}(A) =A$ , a.e. which means $\mu(A\bigtriangleup f^{-1}(A))=0.$
Then there exists $B$ measurable s.t. $A=B$ , a.e. and $f^{-1}(B)=B$ .
I find this problem is similar to Poincare's Theorem, but I was not able to imitate its proof. I tried to let $B= A \cap f^{-1}(A)\cap f^{-2}(A)\cdots$ but failed.
Suggestion: Try instead $B:=\cup_{n=1}^\infty\cap_{k=n}^\infty f^{-k}(A)$.