I'll try and give some insight into how I'd think my way through this problem.
You're told that the difference between the function applied to a sum of $n$ numbers and the sum of the function applied to those numbers is bounded by some constant. Since we have freedom over our choice of $n$, chances are we're going to get something like $\frac{M}{n}$ to play with, because this might provide us with a bound tending to zero.
So let's work backwards. We're looking for something like $|f(x+y) - f(x) - f(y)| \le \frac{k}{n}$ for some constant $k$.
Multiplying through by $n$ we get $|nf(x+y)-nf(x)-nf(y)| \le k$. It's starting to look more familiar now, but it's not in quite the right form. We can get $nf(x+y)$ from by considering $f(n(x+y))$ and $nf(x)+nf(y)$ by considering $f(nx+ny)$... but wait, these are the same thing! So if we add and subtract then we might be able to use the triangle inequality cunningly.
And we can:
$|nf(x+y) - nf(x) - nf(y)| \le |nf(x+y) - f(n(x+y))| + |f(n(x+y)) - nf(x) - nf(y)|$
That $|f(n(x+y)) - nf(x+y)| \le M$ and $|f(n(x+y)) - nf(x) - nf(y)| \le M$ follow immediately from the definition, in the former case by considering $n$ lots of $x+y$ and in the second by considering $n$ lots of $x$ and $n$ lots of $y$.
So we can pick $k=2M$ and working in reverse we arrive at our conclusion that, for any $n$, $|f(x+y)-f(x)-f(y)| \le \frac{2M}{n}$, and the result follows.