Problem says:
Let $R$ be a nontrivial commmutative ring and $G$ a group. Prove that $R[G]$ is commutative if and only if $G$ is abelian.
I solved ($\Rightarrow $) direction as follow:
Suppose that $R[G]$ is commutative. For $x\in R[G]$ , we can write $x$ as $\sum_{g\in G}a_{g}g$ for $a_{g}\in R$ . Then for any $g_{i},g_{j}\in G$ , $g_{i},g_{j}\in R[G]$ . Since $R[G]$ is commutative, $g_{i}g_{j}=g_{j}g_{i}$ . Thus, $G$ is abelian.
In ($\Leftarrow$ ) direction, it seems that I have to express $\left(\sum_{g\in G}a_{g}g\right)\left(\sum_{g\in G}b_{g}g\right) $ as a sum of $g$s with coefficient $a_g$ and $b_g$ and use the comutative of $R$. How could I do?
We have
$$ \left(\sum_{g \in G} a_{g}g \right)\left(\sum_{g \in G} b_{g}g \right) = \sum_{g_{1}, g_{2} \in G} a_{g_{1}}b_{g_{2}}g_{1}g_{2}$$
Using the commutativity of $R$ and $G$, we can rewrite this as
$$ \sum_{g_{1}, g_{2} \in G} a_{g_{1}}b_{g_{2}}g_{1}g_{2} = \sum_{g_{1}, g_{2} \in G} b_{g_{2}}a_{g_{1}}g_{1}g_{2} = \sum_{g_{1}, g_{2} \in G} b_{g_{2}}a_{g_{1}}g_{2}g_{1} = \left(\sum_{g \in G} b_{g}g \right)\left(\sum_{g \in G} a_{g}g \right) $$