I've two proofs that I'm having difficulty in proving.

Problem:

A nonempty subset $\displaystyle B$ of a ring $\displaystyle A$ is called an ideal of $\displaystyle A$ if $\displaystyle B$ is closed with respect to addition and negatives and $\displaystyle B$ absorbs products in $\displaystyle A$.

Pinter's Abstract Algebra book on page 187-188:

Let $\displaystyle A$ be a ring, and $\displaystyle J$ an ideal of $\displaystyle A$. For any element $\displaystyle a \in A$, the symbol $\displaystyle J + a$ denotes the set of all sums $\displaystyle j + a$, as $\displaystyle a$ remains fixed and $\displaystyle j$ ranges over $\displaystyle J$. That is,

$\displaystyle J + a = \{j + a \colon j \in J \}$

$\displaystyle J + a$ is called a coset of $\displaystyle J$ in $\displaystyle A$.

There is a way of adding and multiplying cosets which works as follows:

$\displaystyle (J + a) + (J + b) = J + (a + b)$

And

$\displaystyle (J + a)(J + b) = J + ab$

My question:

How do I prove that:

$\displaystyle (J + a) + (J + b) = J + (a + b)$

And

$\displaystyle (J + a)(J + b) = J + ab$?

How did the author figure out that left side is equal to right side for both of these equations? Is it possible to prove both of these equations?