For $f,g$ real-valued functions, $f$ weakly increasing and continuous, $A\subseteq \mathbb{R}$, can we say \begin{align*} \sup_{x\in A}f(g(x))=f(\sup_{x\in A}g(x)) \end{align*}
I ask because I notice in wiki the likelihood ratio test statistic is written as the difference between the log of sups, while in class notes I see it written as the difference in sup of logs.