In Differential Forms in Algebraic Topology, Bott & Tu they claim that given a short exact sequence of differential complexes:
$$0\rightarrow A \overset{f} \rightarrow B \overset{g} \rightarrow C \rightarrow 0$$
with $f,g$ being chain maps, there is a long exact sequence of cohomology groups:

They define the induced differential operator $d^{\ast}$ as follows. Given $c\in\ker d \cap C^{q}$ we have a $b\in B\cap B^q$ such that $g(b)=c$ and $db\in \ker g = \text{Im} f$. So, we have an $a\in A^{q+1}$ such that $f(a)=db$. We define $d^{\ast}([c])=[a]\in H^{q+1}(A)$.
They say that a simple diagram chasing shows that $d^{\ast}$ is well-defined on equivalence classes by for some reason I'm not able to see it. I've tried to prove that if $c'-c \in \text{Im} d \cap C^{q}$ such that $g(b)=c, \ g(b')=c'$ and $f(a)=db, \ f(a')=db'$ then $a'-a\in \text{Im} d \cap A^{q+1}$ but I am having a lot of trouble showing this. I would appreciate some hints about what I'm missing here.
The given short exact sequence of differential complexes - and i assume we have complexes of modules over a fixed ring, so that diagram chasing is possible - looks in detail as follows:
$\require{AMScd}$ $$ \begin{CD} @. \vdots @. \vdots @. \vdots \\ @. @A{d_A}AA @A{d_B}AA @A{d_C}AA \\ 0 @>>> \bbox[limegreen]{\ A^{q+1}\ } @>f>> B^{q+1} @>g>> C^{q+1} @>>> 0\\ @. @A{d_A}AA @A{d_B}AA @A{d_C}AA \\ 0 @>>> A^{q} @>f>> B^q @>g>> \bbox[yellow]{\ C^q\ } @>>> 0\\ @. @A{d_A}AA @A{d_B}AA @A{d_C}AA \\ 0 @>>> A^{q-1} @>f>> B^{q-1} @>g>> C^{q-1} @>>> 0\\ @. @A{d_A}AA @A{d_B}AA @A{d_C}AA \\ @. \vdots @. \vdots @. \vdots \\ \end{CD} $$
We define as in the question the map from the homology computed in the yellow entry, with values in the homology computed in the green entry:
Why is it well defined?
$\square$