Problem: Solve over $\ZZ$ the functional equation
$f(2a) + 2f(b) = f(f(a+b))$.

Solution: Notice that $f(x) \equiv 0$ or $f(x) \equiv 2x+k$ work
and are clearly the only linear solutions.
We now prove all solutions are linear.

Let $P(a,b)$ be the assertion.
\begin{claim*}
  For each $x \in \ZZ$ we have $f(2x) = 2f(x) - f(0)$.
\end{claim*}
\begin{proof}
  Compare $P(0,x)$ and $P(x,0)$.
\end{proof}
Now, $P(a,b)$ and $P(0,a+b)$ give
\begin{align*}
  f(f(a+b)) &= f(2a) + 2f(b) = f(0) + 2f(a+b) \\
  \implies [2f(a) - f(0)] + 2f(b) &= f(0) + 2f(a+b) \\
  \implies \left( f(a)-f(0) \right) + \left( f(b)-f(0) \right)
  &= \left( f(a+b)-f(0) \right).
\end{align*}
Thus the map $x \mapsto f(x) - f(0)$ is additive,
therefore linear.

\begin{remark*}
  The same proof works on the functional equation
  \[ f(2a) + 2f(b) = g(a+b) \]
  where $g$ is an arbitrary function (it implies that $f$ is linear).
\end{remark*}