For which of the following functions $f(x)$ is $f(a+b) = f(a) + f(b)$?
(A) $f(x) = x^2$
(B) $f(x) = 5x$
(C) $f(x) = 2x+1$
(D) $f(x) = \sqrt{x}$
(E) $f(x) = x-2$
Given solution:
Let $a = 2$, and $b = 3$.
Then solve each of the given functions like the following:
the snap shot suggests that I should calculate all functions which I don't like.
Is there any better method out there?

( not better )
$$ f\left(a+b\right)=f\left(a\right)+f\left(b\right) $$ For $a=b$ we have $$ f\left(2a\right)=2f\left(a\right) $$ Taking $a=0$ gives you $f(0)=0$ and for $b=-a$ we have $f(0)=0=f(x)+f(-x)$ so $f$ is odd. Then you can show by induction that $$ f(n)=nf(1) $$ Then $f$ is odd so it is true for $n \in \mathbb{Z}$. With $r=p/q \in \mathbb{Q}$ we have $$ f\left(r\right)=f\left(\frac{p}{q}\right)=pf\left(\frac{1}{q}\right) \text{ and }f\left(1\right)=f\left(\frac{q}{q}\right)=qf\left(\frac{1}{q}\right) $$ So $$ f\left(r\right)=\frac{p}{q}f\left(1\right)=rf\left(1\right) $$ Then $Q$ is dense in $\mathbb{R}$ so $f$ satisfies $$ f\left(x\right)=xf\left(1\right) $$ So the only solution is $f(x)=5x$ in your exercise.