Commutative squares, define homomorphism such that these 2 exact sequences form one 
I'm trying first to derive the exact sequences from the commutativity of the squares. In a exact sequence, the image of one function is the kernel of the other. However, where can I connect that $0$ on the left? In order for me to see $\ker f$ as the input to $\ker g\circ f$, shouldn't these 2 homomorphisms be connected?
Sorry if I'm too vague, but this book it's too heavy and there are only few definitions. In fact, this should be a theorem, but the book gives as an exercise.
For the part where it defines the homomorphism $h$, that is a coset, right? So I guess the isomorphism theorem for modules should be used, but it's too heavy for me.
 A: To derive the first exact sequence, use that fact that $\ker f\subset \ker g\circ f$.  If $x\in\ker f$ then $f(x)=0$ so $g(f(x))=0$ as well so $x\in\ker g\circ f$.  So the mapping $\ker f\rightarrow \ker g\circ f$ is just the inclusion mapping. 
To define $h$ note that $\textrm{coker} f=Y/\textrm{Im} f$. So yes, the elements of $\textrm{coker } f$ are cosets. Then you have to prove that 
$$0\rightarrow \ker f\rightarrow \ker g\circ f\rightarrow \ker g\stackrel{h}\rightarrow\textrm{coker } f\rightarrow\textrm{coker } g\circ f\rightarrow \textrm{coker } g\rightarrow 0$$ is an exact sequence.
A: The initial $0$ comes from the fact that 
$$\ker f \subseteq \ker g\circ f$$
which is because $f$ might send non-kernel elements to elements that is within the kernel of $g$ and as such we have the inclusion homomorphism $\imath:\ker f\to\ker g\circ f$ which is injective, so we can slam the zero on the left. As having the zero on the left and saying it is exact is the same as sahing that $\imath$ is injective.
For the latter part, remember that $\text{coker}(f)=Y/\text{im}(f)$, what you need to show is not isomorphism theory or use the likes, all you need to show is that the sequence is exact at that point in the chain with that homomorphisms image being the kernel of the latter, and $\ker h$ is the image of the former homomorphism.
