I have the following Lemma (from Rotman)
Let $X$ be a space and, for $i=0,1$, let $\lambda_i^X:X \to X \times I$ be defined by $x \mapsto (x,i)$. If $H_n \left(\lambda_0^X\right)=H_n\left(\lambda_1^X\right):H_n(x)\to H_n \left(X \times I\right)$, then $H_n(f)=H_n(g)$ whenever $f$ and $g$ are homotopic.
With the proof of this fact, this step is used:
Maybe (probably) I am missing something obvious, but it is not immediately clear to me why that is true