We have that $R$ is a commutative ring.
Suppose that $0\rightarrow A\rightarrow B\overset{f}{\rightarrow} C\rightarrow 0$ and $0\rightarrow C\overset{g}\rightarrow D\rightarrow E\rightarrow 0$ are exact sequences.
I want to show that $0\rightarrow A\rightarrow B\overset{gf}{\rightarrow} D\rightarrow E\rightarrow 0$ is also exact.
Could you give me some hints?
Let $\dots\rightarrow A_{i-2}\overset{f_{i-2}}{\rightarrow}A_{i-1}\overset{f_{i-1}}{\rightarrow}A_i\overset{f_i}{\rightarrow}A_{i+1}\rightarrow\cdots$ be a sequence of $R$-modules and $R$-homomorphisms.
It is exact at $A_i$ iff $\ker f_i=\text{Im}f_{i-1}$.
It is exact iff it is exact at each $A_i$.
What does $0\rightarrow A\rightarrow B\overset{f}{\rightarrow} C\rightarrow 0$ mean? Maybe $0\overset{f}{\rightarrow} A\overset{f}{\rightarrow} B\overset{f}{\rightarrow} C\overset{f}{\rightarrow}0$ ?
$$$$
EDIT:
We have that each exact sequence can be arised by short exact sequences as above, right?
But how could we prove this? Could you give me a hint?
I think you want the first term in your exact sequence to be a $0$ (zero )too, not an $O$. $$0\rightarrow A\rightarrow B\overset{f}{\rightarrow} C\rightarrow 0$$ Just means that we don't bother to give a name to the morphism $A\to B$. In particular it does not mean $$0\overset{f}{\rightarrow} A\overset{f}{\rightarrow} B\overset{f}{\rightarrow} C\overset{f}{\rightarrow}0$$ Which doesn't even make sense unless $A=B=C=0$.
For the main question, just note that we a map $$f:B\to C$$ $$g:C\to D$$ Which we can compose to get $$g\circ f:B\to D$$ You are asked to show that this map makes the longer sequence $$0\rightarrow A\rightarrow B\overset{g\circ f}{\rightarrow} D\rightarrow E\rightarrow 0$$ exact
I'm not exactly sure what you mean with your new question. Every long exact sequence can be 'weaved together' from short exact sequences as follows:
I'll leave it to you to figure out how to define the $C_i$ in terms of the $A_i$ and maps between them. Let me know if this answers your question or if you are looking for something else.
I'll give some more information:
If we are given any exact sequence $S$: $$\dots\to A_{n-1}\stackrel{f_{n-1}}{\to}A_{n}\stackrel{f_{n}}{\to}A_{n+1}\stackrel{f_{n+1}}{\to}\dots $$ Then we can construct a sequence of short exact sequences $S_n$ as follows: The middle term of $S_n$ will be $A_n$. Given the exact sequence $S$, what is a natural object + map that injects into $A_n$? The answer is $\ker f_n$ with the inclusion. What is a natural object and map that $A_n$ surjects into? The answer is $\text{image}(f_n)$ with the map $f_n$. So we construct a new short exact sequence: $$0\to \ker f_n\stackrel{i}{\to} A_n\stackrel{f_n}{\to}\text{image}f_n\to 0$$ The question is, is this sequence indeed exact? The only non trivial part is checking whether $\text{image}i=\ker f_n$. But this is true by definition, since $i$ is just the inclusion of $\ker f_n$ into $A_n$.
Now we note that if we consider $S_n$ and $S_{n+1}$ we have $$0\to \ker f_n\stackrel{i}{\to} A_n\stackrel{f_n}{\to}\text{image}f_n\to 0$$ $$0\to \ker f_{n+1}\stackrel{i}{\to} A_{n+1}\stackrel{f_{n+1}}{\to}\text{image}f_{n+1}\to 0$$ But since the sequence $S$ is exact by assumption, $\text{image}f_n=\ker f_{n+1}$. Hence we are in the situation of your original question, and we find that we can combine $S_n$ and $S_{n+1}$ into a longer exact sequence by composing (as in your original question): $$0\to \ker f_n\stackrel{i}{\to} A_n\stackrel{i\circ f_n}{\to}A_{n+1}\stackrel{f_{n+1}}{\to}\text{image}f_{n+1}\to 0$$ Note that $i\circ f_n=f_n$, hence we can rewrite the above simply as $$0\to \ker f_n\stackrel{i}{\to} A_n\stackrel{f_n}{\to}A_{n+1}\stackrel{f_{n+1}}{\to}\text{image}f_{n+1}\to 0$$ And we can keep repeating this procedure; this longer sequence can be combined with $S_{n+2}$ and $S_{n-1}$.
In this way every exact sequence arises as a composition of short exact sequences.