Constructing bijection between $\mathrm{Ext}_{\mathbb{Z}}(\mathbb{Z}/m\mathbb{Z},A)$ and $A/mA$ I'm reading Mac Lane's Homology and get stuck at the proof of proposition $1.1$ chapter $3$. This proposition states that there exist bijection 
$$
\eta:\mathrm{Ext}_\mathbb{Z}(\mathbb{Z}/m\mathbb{Z},A)\to A/mA:[E]\mapsto a+mA
$$
where $a$ is determined from exact sequence $E:0\xrightarrow{} A\xrightarrow{\chi}B\xrightarrow{\sigma}\mathbb{Z}/m\mathbb{Z}\xrightarrow{} 0$ by conditions $\chi(a)=mu$, $\sigma(u)=c$ and $c$ is a generator of $\mathbb{Z}/m\mathbb{Z}$. In the first part of proof he states that for each $b\in B$ there is a representaion $b=\chi(a)+h u$, for some $a\in A$ and $h\in\{0,...,m-1\}$. Moreover there exist $g\in A$ such that $\chi(g)=mu$. This allows us express addition in $B$ in the following way
$$
(\chi(a)+hu)+(\chi(a')+h'u)=
\begin{cases}
\chi(a+a')+(h+h')u & \text{ if }\quad h+h'<m\\
\chi(a+a'+g)+(h+h'-m)u & \text{ if }\quad h+h'\geq m
\end{cases}\tag{1}
$$ 
In the second part he constructs inverse map to $\eta$. For each coset $g+mA$ he defines extension $E:0\xrightarrow{} A\xrightarrow{\chi}B\xrightarrow{\sigma}\mathbb{Z}/m\mathbb{Z}\xrightarrow{} 0$ where $B=\{(a,h):a\in A\quad, h\in\{0,...,m-1\}\}$ with addition defined by table $(1)$. Could some one explain me in more detail how addition on $B$ is defined? Also I can't see why this inverse map is well defined, namely, why for two different elemnts $a',a''\in g+mA$ the respective extensions $E'$ and $E''$ are congruent?
 A: Although you already understand this part, I want to re-explain the uniqueness of the expressions $\chi(a) + hu$ since that's the key to everything. Here's the way I think about it. 
A priori we only know that $B$ is an extension of $\mathbb{Z}/m$ by $A$, i.e. that there is some exact sequence like the one you wrote down. There is a group map from $B$ to $\mathbb{Z}/m$, but probably not a group map backwards. However, there's certainly a set map backwards; namely, take a generator $c$ of $\mathbb{Z}/m$ (I would actually prefer to just pick the generator 1, but I'll stick to your notation), and pick a lift $u$, that is, some pre-image in $B$ (one exists by surjectivity). Then $2u$ lifts $2c$, etc, so we have a set-theoretic map (not a homomorphism) from $B$ back to $A$. Now take something arbitrary in $B$ and call it $b$. Then $\sigma(b) = kc$ for some $k$. Now that means that $b - ku$ is in the kernel of $\sigma$, so is $\chi(a)$ for some unique $a$. So we have $b = \chi(a) + ku$ for some unique $a$ and unique $k$ in $u$. I'm going to call this (I made this name up) the "coordinates" of $b$ attached to the extension. The crucial point is that any two distinct elements of $b$ have distinct coordinates. Remember that we only call an expression $b = \chi(a) + ku$ "coordinates" for $b$ if $k$ is between 0 and $m - 1$ (inclusive).
You might think that writing $b$ in terms of its coordinates just makes $B$ the direct sum of $A$ and a copy of $\mathbb{Z}/m$, but that's not true. The problem is that these coordinates don't behave well under addition (you could say that they are set-theoretic coordinates but not group-theoretic coordinates). Let's see why. If we add two elements of $B$ given by coordinates,
$$
\chi(a) + ku + \chi(a') + k'u,
$$
we certainly get
$$
\chi(a + a') + (k + k')u,
$$
since $\chi$ is a homomorphism, but these might not be coordinates, because $k + k'$ might be too big. More precisely, if $k + k'$ is less than $m$, these are coordinates, and that's all there is to say - the coordinates of the sum were the sum of the coordinates. 
If $k + k'$ is bigger than $m$, however, we need to figure out the coordinates for elements of the form
$$
b = \chi(a + a') + (k + k')u.
$$
Well, if you think about it, $k + k'$ is definitely stil less than $2m - 1$, so if you subtract $m$ from $k + k'$, you'll have a coordinate for $b - mu$:
$$
b - mu = \chi(a + a') + (k + k' - m)u.
$$
But we don't want coordinates for $b - mu$, rather, we want coordinates for $b$.  Now, since $mu$ is in the kernel of the map to $\mathbb{Z}/m$, we can write it as $\chi(g)$ for some $g$. So 
$$
b = b - mu + mu = \chi(a + a' + g) + (k + k' - m)u.
$$
That's it! Those are coordinates for $b$, so they are uniquely determined.
Summarizing: given an extension, we picked a lift $u$ of the generator $c$ of $\mathbb{Z}/m$, we wrote everything in coordinates, which depended on this choice, and we discovered that addition is almost determined by these coordinates, once we know some $g \in A$ mapping to $mu$. The map $\chi$ the sends $a$ to $(a, 0)$ and the map $\sigma$ projects onto the second coordinate, and that's how we build the extension knowing only $a$ (remembering always that the addition rule on coordinates is given by the above recipe, and not the "obvious" one).
Conversely, given a $g \in A$, we can build an extension simply by taking the underlying set to be coordinates as above and taking this rule to give the addition map in the extension. For emphasis, when working with the converse, you might write a pair of coordinates as a tuple $(a, k)$, remembeirng that these tuples, in spite of the notation, don't necessarily add as in a direct product.
Two things remain to be checked - really they are the same thing: 


*

*Our coordinates depended on a choice $u$ of a lift of $c$. How do we know that $g$ will not depend on that choice? (Answer: it will, but only mod $mA$.)

*Why do $g$ and $g + mg'$ give the same extension? (This is your second question.)
To check 1, note that if $u'$ is another lift, then $u - u' = \chi(\widetilde{a})$ for some $\widetilde{a} \in A$. So if $g \in A$ satisfies $\chi(g) = mu$, then $g - m\widetilde{a}$ satisfies the $\chi(g) = mu'$, but that's the same element of $A/m$. 
Before we check two, note (notation as above) that in the one coordinate system
$$
b = \chi(a) + ku,
$$
then in the other coordinate system we have
$$
b = \chi(a + k\widetilde{a}) + ku'.
$$
This change of-coordinates formula tells you the isomorphism that you seek! Namely, if $g$ and $g + mg'$ are two elements of $A$ in the same coset of $mA$, the isomorphism of attached extensions sends the coordinates $(a, k)$ to $(a - kg', k)$.
