[step:Define the connecting homomorphism on reduced homology]
For each $i\in \mathbb{Z}$, define
\begin{align*}
\delta_i:\widetilde{H}_i(K;k)\to \widetilde{H}_{i-1}(A\cap B;k)
\end{align*}
as follows. Let $[z]\in \widetilde{H}_i(K;k)$ be represented by a cycle
\begin{align*}
z\in \widetilde{C}_i(K;k), \qquad \widetilde{\partial}_i^K z=0.
\end{align*}
Since $q_i$ is surjective, choose a pair
\begin{align*}
(a,b)\in \widetilde{C}_i(A;k)\oplus \widetilde{C}_i(B;k)
\end{align*}
such that $q_i(a,b)=z$. Because $q_*$ is a chain map,
\begin{align*}
q_{i-1}\bigl(\widetilde{\partial}_i^A a,\widetilde{\partial}_i^B b\bigr)
=
\widetilde{\partial}_i^K q_i(a,b)
=
\widetilde{\partial}_i^K z
=
0.
\end{align*}
Thus
\begin{align*}
\bigl(\widetilde{\partial}_i^A a,\widetilde{\partial}_i^B b\bigr)\in \ker q_{i-1}.
\end{align*}
By exactness at the chain level, there is a unique chain
\begin{align*}
c\in \widetilde{C}_{i-1}(A\cap B;k)
\end{align*}
such that
\begin{align*}
\iota_{i-1}(c)=\bigl(\widetilde{\partial}_i^A a,\widetilde{\partial}_i^B b\bigr).
\end{align*}
Equivalently,
\begin{align*}
\widetilde{\partial}_i^A a=c,\qquad \widetilde{\partial}_i^B b=-c.
\end{align*}
The chain $c$ is a cycle. Indeed,
\begin{align*}
\iota_{i-2}\bigl(\widetilde{\partial}_{i-1}^{A\cap B}c\bigr)
=
\bigl(\widetilde{\partial}_{i-1}^A\widetilde{\partial}_i^A a,\widetilde{\partial}_{i-1}^B\widetilde{\partial}_i^B b\bigr)
=
(0,0),
\end{align*}
and $\iota_{i-2}$ is injective. Hence $\widetilde{\partial}_{i-1}^{A\cap B}c=0$.
Set
\begin{align*}
\delta_i([z])=[c].
\end{align*}
This class is independent of the chosen lift $(a,b)$ and of the representative $z$. If another lift of the same $z$ is $(a',b')$, then $(a-a',b-b')\in \ker q_i$, so $(a-a',b-b')=\iota_i(d)=(d,-d)$ for some $d\in \widetilde{C}_i(A\cap B;k)$. Taking boundaries gives the corresponding chains $c$ and $c'$ with
\begin{align*}
c-c'=\widetilde{\partial}_i^{A\cap B}d,
\end{align*}
so $[c]=[c']$. If $z$ is replaced by $z+\widetilde{\partial}_{i+1}^K w$, choose a lift $(u,v)$ of $w$ and replace $(a,b)$ by
\begin{align*}
(a,b)+\bigl(\widetilde{\partial}_{i+1}^A u,\widetilde{\partial}_{i+1}^B v\bigr).
\end{align*}
The boundary of this new lift is unchanged because boundaries square to zero. Thus $\delta_i$ is a well-defined $k$-[linear map](/page/Linear%20Map).
[/step]