Remark about $\sup(f+g)$ and $\sup (A+B)$ 1. Let $A$ and $B$ are some nonempty subsets of $\mathbb{R}$. Define $A+B=\{a+b: a\in A, b\in B\}$ it's easy to prove that $$\sup(A+B)=\sup A+\sup B \qquad(1)$$
2. Let $f(x)$ and $g(x)$ are some real-valued functions on $[a,b]$. Then $$\sup\limits_{[a,b]} (f(x)+g(x))\leqslant\sup\limits_{[a,b]} f(x)+\sup\limits_{[a,b]} g(x) \qquad(2)$$
Remark: By the way strict inequality hold for function $f(x)=x$ and $g(x)=1-x$ on $[0,1]$.
I am confused that in $(1)$ we have equality and in $(2)$ inequality but $f(x)$ and $g(x)$ are also some nonempty subsets of $\mathbb{R}$ and by $(1)$ we must have equality in $(2)$. What's the problem?
Can anyone explain this phenomenon in detail?

In one you are taking the sum over fixed $x\in[a,b]$, whereas in the case of $A+B$ you are summing over all combinations of $a$ and $b$. You would achieve an equality in the second case if you instead had 
$$\sup_{x,y\in[a,b]}(f(x)+g(y))$$
