First of all, if a function $f: X\to \mathbb{R}$ is measurable so is $f \circ T: X \to \mathbb{R}$.
This is because by hypothesis $f^{-1}(B) \in \Sigma$ and $(f\circ T)^{-1}(B) = T^{-1}(f^{-1}(B))\in \Sigma$ for all Borel sets in $\mathbb{R}$ since $T:(X,\Sigma) \to (X,\Sigma)$ is measurable.
Now if $f: X\to \mathbb{R}$ is a function that is zero almost everywhere, there is a null set $N \in \Sigma$ such that $f(x) = 0$ for all $x \notin N$. But this means that $f(Tx) = 0$ for all $x \notin T^{-1}(N)$ and $\mu(T^{-1}(N)) = 0$ because of the assumption that $T$ preserves $\mu$. Therefore $f \circ T = 0$ almost everywhere.
Now if $f = g$ almost everywhere then $f-g = 0$ a.e., hence $(f-g)\circ T = f\circ T - g \circ T = 0$ a.e., hence $f \circ T = g\circ T$ almost everywhere.
That's what you wanted to show.
But now you want to go a step further and say that for $f \in L^2$ we have $\|f \circ T\|_2 = \|f\|_2$.
Your proof is flawed in that the very first expression already assumes that $f \circ T - g \circ T \in L^2$, and you don't know that yet!
What you do know after the first part of this answer is that $f = g$ a.e. implies that $f \circ T = g \circ T$ a.e. hence $|f \circ T|^2 = |g \circ T|^2$ a.e., and thus $f \circ T$ is square integrable if and only if $g \circ T$ is square integrable.
Now you want to prove that $\|f \circ T\|_2 = \|f\|_2$ for all $f \in L^2$, so here's an outline:
- If $f$ is simple, this is clear (why exactly?)
- If $f \geq 0$ then approximate $f$ monotonically with a sequence of simple functions $s_n$ and observe that $s_n \circ T \to f \circ T$ monotonically and apply the monotone convergence theorem and point 1.
- Split $f$ into real and imaginary parts and split real and imaginary parts into positive and negative parts and apply 2.