Sorry about my english as in the title above.
Let $R$ be a commutative ring and $I, J$ are ideals of $R$. Let $f:R \to R'$ be a ring homomorphism. Show that $f(I+J) = f(I) + f(J)$ and $f(IJ) = f(I)f(J)$.
My attempt: (Edited)
First, we'll show that $f(I+J) = f(I) + f(J)$.
For left to the right, let $x,y\in f(I+J)$, that's $x = f(a+b)$ and $y=f(c+d)$ for $a,c \in I$ and $b,d \in J$. Now, we have \begin{align*} x+y = f(a+b) + f(c+d) &= f((a+c)+(b+d)) \\ &= f(a+c) + f(b+d) \\ &\in f(I) + f(J) \end{align*}
Next, for right to the left, let $s\in I, t\in J$ such that $f(s) + f(t) \in f(I) + f(J)$. So, $f(s) + f(t) = f(s+t) \in f(I+J)$.
Hence, $f(I+J) = f(I) + f(J)$.
Now, we'll prove the rest.
For left to the right, let $x \in f(IJ)$, that's $x = f(a_1b_1+a_2b_2+\dots a_nb_n)$ where $a_i \in I, b_i \in J, i=1,2,\dots,n$. Then, \begin{align*} x = f(a_1b_1+a_2b_2+\dots a_nb_n) &= f(a_1b_1) + f(a_2b_2) + \dots f(a_nb_n) \\ &= f(a_1)f(b_1) + f(a_2)f(b_2) + \dots + f(a_n)f(b_n) \\ &\in f(I)f(J) \end{align*}
For right to the left, let $y \in f(I)f(J)$, that's $y=\sum_{p=1}^n f(a_p)f(b_p)$. Then, \begin{align*} y = f(a_1)f(b_1) + f(a_2)f(b_2) + \dots + f(a_n)f(b_n) &= f(a_1b_1) + f(a_2b_2) + \dots + f(a_nb_n) \\ &= f(a_1b_1 + a_2b_2 + \dots + a_nb_n) \\ &\in f(IJ) \end{align*}
Hence, $f(IJ) = f(I)f(J)$.
Is above true? Please give me some corrections. Thanks in advance.
The proof looks OK, but for the inclusion $f(I+J) \subset f(I) + f(J)$ isn't this sufficient? Take $x \in f(I + J)$, then $$ \exists a \in I, b \in J: x = f(a + b). $$ $f$ is a homomorphism, so $f(a + b) = f(a) + f(b)$. This means that $x = f(a) + f(b) \in f(I) + f(J)$. This way you also don't have to motivate that $x + y$ represent an arbitrary element of $f(I+J)$.