[guided]Assume $T$ is invertible, $T^{-1}: X \to X$ is measurable, and $T^{-1}$ is measure-preserving. Applying the isometry result already proved to $T^{-1}$ defines a bounded linear isometry
\begin{align*}
U_{T^{-1}}: L^2(X,\mu) &\to L^2(X,\mu) \\
[g] &\mapsto [g \circ T^{-1}].
\end{align*}
In particular, $g \circ T^{-1} \in L^2(X,\mu)$ and $\|g \circ T^{-1}\|_{L^2(X,\mu)} = \|g\|_{L^2(X,\mu)}$.
We now compute the adjoint from the defining identity for adjoints on the Hilbert space $L^2(X,\mu)$: we want to find $h \in L^2(X,\mu)$ such that
\begin{align*}
\langle U_T f, g\rangle_{L^2(X,\mu)} = \langle f, h\rangle_{L^2(X,\mu)}
\quad\text{for every } f \in L^2(X,\mu),
\end{align*}
and then $U_T^* g := h$.
To evaluate the left-hand side rigorously rather than informally substituting in an integral, we use the change-of-variables formula for pushforward measures. The strategy is to identify a single integrable function $\phi$ to which the formula will be applied. Define
\begin{align*}
\phi: X &\to \mathbb{C} \\
y &\mapsto f(y)\,\overline{g(T^{-1}(y))}.
\end{align*}
We verify $\phi \in L^1(X,\mu)$ before applying the formula. Since $g \circ T^{-1} \in L^2(X,\mu)$ (from applying the isometry step to $T^{-1}$), the [Cauchy-Schwarz Inequality](/theorems/432) in $L^2(X,\mu)$ gives
\begin{align*}
\int_X |\phi(y)| \, d\mu(y)
= \int_X |f(y)|\,|g(T^{-1}(y))| \, d\mu(y)
\leq \|f\|_{L^2(X,\mu)} \, \|g \circ T^{-1}\|_{L^2(X,\mu)}
= \|f\|_{L^2(X,\mu)} \, \|g\|_{L^2(X,\mu)}
< \infty.
\end{align*}
Therefore $\phi \in L^1(X,\mu)$, so the [Change of Variables (general)](/theorems/22) applies to $\phi$ through the pushforward identity.
By the measure-preserving hypothesis, $T_\#\mu = \mu$. Computing $\phi \circ T$ using $T^{-1} \circ T = \operatorname{id}_X$,
\begin{align*}
\phi(T(x)) = f(T(x))\,\overline{g(T^{-1}(T(x)))} = f(T(x))\,\overline{g(x)}.
\end{align*}
The change-of-variables formula then gives
\begin{align*}
\int_X f(T(x))\,\overline{g(x)} \, d\mu(x)
&= \int_X \phi(T(x)) \, d\mu(x) \\
&= \int_X \phi(y) \, d(T_\#\mu)(y) \\
&= \int_X \phi(y) \, d\mu(y) \\
&= \int_X f(y)\,\overline{g(T^{-1}(y))} \, d\mu(y).
\end{align*}
Reinterpreting the endpoints of this chain as inner products,
\begin{align*}
\langle U_T f, g\rangle_{L^2(X,\mu)}
= \int_X f(T(x))\,\overline{g(x)} \, d\mu(x)
= \int_X f(y)\,\overline{g(T^{-1}(y))} \, d\mu(y)
= \langle f, U_{T^{-1}} g\rangle_{L^2(X,\mu)}.
\end{align*}
Because this identity holds for every $f,g \in L^2(X,\mu)$, the adjoint of $U_T$ is
\begin{align*}
U_T^* = U_{T^{-1}}.
\end{align*}[/guided]