Let $f$ and $g$ be continuous functions on $X$ where $(X,d)$ is a metric space.
Define $h(x)=\max\{f(x),g(x)\}$. Show that $h$ is continuous on $X$.
Let $\epsilon>0$ and $x_{0}\in\mathbb{R}$
Without loss of generality, suppose $f(x_{0})>g(x_{0})$
$\implies |h(x)-h(x_{0})|=|h(x)-f(x_{0})|$
Since $g$ is continuous on $X$,
$\exists\space\delta_{0}>0$ such that if $|x-x_{0}|<\delta_{0}$ then $|g(x)-g(x_{0})|<f(x_{0})-g(x_{0})$ which implies $g(x)<f(x_{0})$
Since $f$ is continuous on $X$,
$\exists\space\delta_{1}\space(0<\delta_{1}\le\delta_{0})$ such that if $|x-x_{0}|<\delta_{1}$ then $|f(x)-f(x_{0})|<f(x_{0})-g(x)$ which implies $f(x)>g(x)$
So let $\delta=\delta_{1}$
If $|x-x_{0}|<\delta$ then $|h(x)-f(x_{0})|=|f(x)-f(x_{0})|<\epsilon$ since $f$ is continuous on $X$
$\therefore\space h$ is continous on $X$
You can use the fact that $h(x)=\frac{f(x)+g(x)+|f(x)-g(x)|}{2}$.