$f$ must be strictly decreasing because it is bijective. Therefore it is continuous (adapt the answer of
Strictly increasing continuous function) and we conclude that it is a homeomorphism such that $f([0,\infty)) = (0,\infty])$.
You have $\max g(x) = g(m)$ for some $m \in X$ because $g$ is continuous and $X$ is compact. Therefore $f(\max g(x)) = \min fg(x)$ because $g(x) \le g(m)$ implies $fg(x) \ge fg(m)$.
Hence your question is equivalent to the following: If $G,H : X \to (0,\infty]$ are continuous, do we have $\lvert \min G(x) - \min H(x) \rvert \le \max \lvert G(x) - H(x) \rvert$? This is seen by considering $g = f^{-1}G, h = f^{-1}G : X \to [0,\infty)$.
Let us first consider the case that $G(X),H(X) \subset (0,\infty)$. Then $M = \max \lvert G(x) - H(x) \rvert < \infty$.
If $M = 0$, then $G = H$ and the claim is true. Now let $M > 0$. This means $M \ge G(x) - H(x) \ge - M$ for all $x$, i.e. $H(x) + M \ge G(x)$ and $G(x) + M \ge H(x)$ for all $x$. Choose $x_G, x_H \in X$ such $G(x_G) = \min G(x)$ and $H(x_H) = \min H(x)$. Assume that $\lvert G(x_G) - H(x_H) \rvert > M$. Let $G(x_G) > H(x_H)$ (the case $G(x_G) < H(x_H)$ is treated similarly). This means $G(x_G) - H(x_H) > M$. Hence $G(x_G) > H(x_H) + M \ge G(x_H)$ which contradicts the definition of $x_G$. Therefore the assumption was wrong and we conclude $\lvert G(x_G) - H(x_H) \rvert \le M$.
If $\infty$ is in the image of $G$ or $H$, we have the problem that we get expressions like $\infty - \infty$, $\infty - t$, $t - \infty$ with $t \in (0,\infty)$. It seems to be reasonable to define $\infty - t = \infty$ and $t - \infty = -\infty$ and $\lvert \infty \rvert = \lvert -\infty \rvert = \infty$, but also other approaches are conceivable. Moreover, $\infty - \infty = 0$ could be a definition, but in this case $G - H$ will in general not be continuous (if that should be what you expect): Consider for example $X = [1,\infty], G(x) = x, H(x) = x + 1$ where we understand $\infty + 1 = \infty$.