Here is the full question: Let $X$ be a topological space and $f,g$ two continuous functions $f:X\to \Bbb R$. Prove that the functions $h(x)=|f(x)|$ and $k(x)=\max\{f(x),g(x)\}$ are both continuous.
I am having trouble proving the first part that $h(x)=|f(x)|$ is continuous.
Here's my answer for the second part:
We know the maximum of two functions $f(x)$ and $g(x)$ is defined as $max\{f(x),g(x)\}=\frac{f(x)+g(x)}{2}+\frac{|f(x)-g(x)|}{2}$. Since this is the sum of two continuous functions $f(x)$ and $g(x)$, then by the properties of continuous functions, $k(x)$ is also a continuous function.
Could someone point me in the right direction for the first part?