$\newcommand{\set}[1]{\left\{#1\right\}}$
Let $f,g$ be integrable in $[a,b]$. Let $h(x) = \max\set{f(x),g(x)}$. I need to prove that $h$ is integrable using the Riemann criterion of integrability (and not using linearity of integrals), which states
A function $f:[a,b]\to\mathbb{R}$ is Darboux integrable if and only if, for every $\epsilon > 0$, there exists a partition $P$ of $[a,b]$ such that $U(f,P)-L(f,P)\leq\epsilon$
So the strategy is to take a partition $P$, look at an arbitrary subinterval, and look at $M_k(h),m_k(h)$, the supremum and infimum of $h$ in $[x_{k-1},x_k]\subset [a,b]$, and try to bound them from above using the fact that $f,g$ are integrable.
After some thinking, I concluded that $$ M_k(h) = \max\set{M_k(f),M_k(g)},\ \ m_k(h) \geq \max\set{m_k(f),m_k(g)} $$ Which leads to the fact that $$ M_k(h) - m_k(h) \leq \max\set{M_k(f),M_k(g)} - \max\set{m_k(f),m_k(g)} $$ $$ \leq \max\set{M_k(f),M_k(g)} - \min\set{m_k(f),m_k(g)} $$
But this is where I am stuck. For any given $a,b,c,d$, I have nothing to say about $\max\set{a,b}-\min\set{c,d}$, even if I know that $a>c, b>d$
I have seen another question where in one of the answers the writer concluded that the above is less then or equal to
$$ \max\set{M_k(f)-m_k(f),M_k(g)-m_k(g)} $$ which, as I figured out, is not true in general.