Let $A$, $B$ be two abelian groups, let $f$ be a group homomorphism from $A$ to $B$. Now we consider $A$, $B$ as $R$-modules over a ring $R$. Show that $f$ is also a module homomorphism between them.
I know is clear that $f(a+b)=f(a)+f(b)$, but how can I show that $f(ra)=rf(a)$?
In general there is no reason for $f$ to be an $R$-module homomorphism just because it is an abelian group homomorphism. Consider complex conjugation $\bar{\cdot} : \mathbb{C} \to \mathbb{C}$. It is clearly an abelian group morphism since $\overline{z+z'} = \bar{z} + \bar{z}'$. But if you take $R = \mathbb{C}$, it's clearly not an $R$-module homomorphism, since e.g. $\overline{i \cdot 1} = - i \neq i \cdot \bar{1} = i$.
If $R = \mathbb{Z}$ then as quid mentions it would actually be true. If $n \ge 0$ is an integer then $$f(n \cdot x) = f(x + \dots + x) = f(x) + \dots + f(x) = n \cdot f(x),$$ because $f$ is a group morphism, and then $f((-n) \cdot x) = -f(n \cdot x)$ (still because $f$ is a group morphism) thus $f((-n) \cdot x) = (-n) \cdot f(x)$. But this is a very special situation.