Showing that $ \sup_{x \in A}(|f(x)|-|g(x)|)=\sup_{x\in A} |f(x)|-\inf_{x\in A}|g(x)|$
Solution 1:
\begin{align} \sup_{x \in A}(|f(x)|-|g(x)|)&=\sup_{x\in A} |f(x)|-\inf_{x\in A}|g(x)|\end{align}
Let, $h= |f|=|g|$ and $A=I\subset \Bbb{R} \text { an interval }$
Then, \begin{align} \sup_{x \in I}(h(x)-h(x))&=\sup_{x\in I} h(x)-\inf_{x\in I} h(x)\end{align}
$0=\sup_{x\in I} h(x)-\inf_{x\in I} h(x)$ $0=\omega_h(I)$
Now, choose a function $h:I\to \Bbb{R}$ such that $\omega_h(I) \neq 0$
Does this provides a counter example?
$h: [0, 1]\to \Bbb{R}$ defined by
$$h(x)=\begin{cases} 1 &\text{ if } x\in [0,\frac{1}{2}] \\ 2 &\text{ if } x\in (\frac{1}{2},1]\end{cases}$$
Then, \begin{align} \omega_h(I) &=\sup_{x\in I} h(x)-\inf_{x\in I} h(x)\\&=2-1\\&=1\end{align}