Factor sets and group extensions (Homological algebra- Hilton and Stammbach VI.10.1) Show that an extension $$A\xrightarrow{i} E\xrightarrow{p} G$$ may be described by a factor set, as follows. Let $s:G\rightarrow E$ be a secion so that $ps=1_G$. Every elmenet of $E$ is of the form $i(a).s(x)$  with $a,x$ uniquely determined. The multiplication in $E$ determined a function $f:G\times G\rightarrow A$ by $$s(x)\cdot s(x')=i(f(x,x'))\cdot s(xx')$$
for all $x,x'\in G$. 

i) Show that associativity of multiplication in $E$ implies 
$$xf(y,z)-f(xy,z)+f(x,yz)-f(x,y)=0$$
A function satisfying above condition is called a factor set.

ii) Show that if $s,s': G\rightarrow E$ be two sections and $f,f'$ be corresponding factor sets then there exists a function $g:G\rightarrow A$ with $$f'(x,y)=f(x,y)+g(xy)-g(x)-xg(y)$$ for all $x,y\in G$

I tried something like this : 
As any element in $E$ is of the form $i(a)s(g)$
Consider $$i(a)s(g)i(b)s(h)=i(a)i(gb)s(g)s(h)$$
$$=i(a+gb)i(f(g,h))s(gh)$$
$$=i(a+gb+f(g,h))s(gh)$$
So, group law on $A\times G$ is given by $$(a,g)(b,h)=(a+gb+f(g,h),gh)$$
So, $$((a,g)(b,h))(c,m)=(a+gb+f(g,h)+ghc+f(gh,m),ghm)$$
and $$(a,g)((b,h),(c,m))=(a+gb+ghc+gf(h,m)+f(g,hm),ghm)$$
As suggested i use associativity of elements in $E$ and conlcuded that 
$$(a+gb+f(g,h)+ghc+f(gh,m),ghm)=(a+gb+ghc+gf(h,m)+f(g,hm),ghm)$$
i.e., $$f(g,h)+f(gh,m)=gf(h,m)+f(g,hm)$$
So, we have $$xf(y,z)-f(xy,z)+f(x,yz)-f(x,y)=0$$ for all $x,x'\in G$

I am not sure how to proceed with second part...
I do not even understand what he is trying to ask.. Suppose we have sections $s,s'$ we have corresponding $f,f'$ and for this we have 
$$xf(y,z)-f(xy,z)+f(x,yz)-f(x,y)=0=xf'(y,z)-f'(xy,z)+f'(x,yz)-f'(x,y)$$ 
i.e., $$-xf(y,z)+f(xy,z)-f(x,yz)+f(x,y)=-xf'(y,z)+f'(xy,z)-f'(x,yz)+f'(x,y)$$ 
i.e., $$f'(x,y)=f(x,y)-xf(y,z)+f(xy,z)-f(x,yz)+xf'(y,z)-f'(xy,z)+f'(x,yz)$$ 
I define $g:G\rightarrow A$  as $g(x)=f(x,z)-f'(x,z)$ then i have 
$$f'(x,y)=f(x,y)-xg(y)+g(xy)-f(x,yz)+f'(x,yz)$$ 
I have got something similar to what i need but this is not complete..
Please suggest some hints
 A: If you have two sections $s$, $s':G\to E$, then for all $g\in G$ we have that $s(g)$ and $s'(g)$ are two elements of $E$ with the same image in $G$: it follows that there exists a unique $t(g)\in A$ such that $s(g)=t(g)s'(g)$.
Figure out what consequences this has in terms of the factor sets corresponding to $s$ and $s'$.
A: I think the 2nd quest is still open. 
By $s(x)s'(x)^{-1} \in \ker(p)=\text{im}(i)$ and injectivity of $i$ there is a unique $g(x) \in A$ such that $i(g(x))=s(x)s'(x)^{-1}$. This defines a function $g:G \to A$.
Before we can deduce the formula in part (ii) of the question, it's important to note that the action of $G$ on $A$ is defined by $i(g\cdot a) := s(x)i(a) s(x)^{-1}=s'(x)i(a)s'(x)^{-1}$. 
Now we are ready for the computation: 
$$i(f(x,y))=s(x)s(y)s(xy)^{-1}=i(g(x))s'(x)s(y)s(xy)^{-1}$$
$$=i(g(x))s'(x)i(g(y))s'(y)s(xy)^{-1}=i(g(x))i(x\cdot g(y))s'(x)s'(y)s(xy)^{-1}$$
$$=i(g(x)+x\cdot g(y))i(f'(x,y))s'(xy)s(xy)^{-1}=i(g(x)+x\cdot g(y)+f'(x,y))i(g(xy))^{-1}$$
$$=i(g(x)+x\cdot g(y)+f'(x,y)-g(xy))$$
Canceling $i$ on both sides yields the sought-after formula. 
N.b. In modern language $f$ is called a 2-cocycle and the function $f'-f$ is called a 2-coboundary. 
