If $A,B$ are ideals in $R$, show that $AB=\{\sum a_ib_i \colon a_i \in A, b_i \in B, n \in \mathbb{Z}^+\}$ is an ideal in $R$. 
If $A,B$ are ideals in $R$, show that $AB=\{\displaystyle\sum a_i b_i \colon a_i \in A, b_i \in B, n \in \mathbb{Z}^+\}$ is an ideal in $R$.

I am having trouble justifying that for all $s \in AB$ and for all $r \in R$, then $sr \in AB$.
I know that for all $a \in A, b \in B, r \in R$, we have $ar \in A, br \in B$ since $A,B$ are ideals in $R$.
Here $R$ is a commutative ring with unity. But I don't think it suffices to show that since $a_i(b_ir)=b_i(a_i r)$, we can conclude $(a_ib_i)r$ is in $AB$ from this. 
Any ideas or hints?

Let $s=\sum a_ib_i\in AB$ and $r\in R$. Then we have that $sr=(\sum a_ib_i)r=\sum a_i(b_ir)=\sum a_ib_i'$, where $b_i'=b_ir\in B$ since $B$ is an ideal. So, $sr\in AB$.
