How does a homotopy $f\simeq g$ induces a homotopy equivalence between their mapping toruses $M_f$ and $M_g$? By a mapping torus $M_f$ of a continuous map $f:X\to X$ we mean the space $$X\times I/\{(x,0)\sim (f(x),1)\}.$$ 
Now given $f,g:X\to X$ and $F:X\times I\to X$ with $F(x,0)=f(x)$ and $F(x,1)=g(x)$, namely $F$ a homotopy between $f$ and $g$, then how does $F$ induce a homotopy equivalence $\bar F:M_f\to M_g$?
I came up with the map defined by $M_f\ni(x,t)\mapsto (F(x,t),t)\in M_g$, which is a well-defined continuous map from $M_f$ to $M_g$, but I'm having difficulties showing that it is a homotopy equivalence. A natural inverse of this map is given by $M_g\ni (x,t)\mapsto (F(x,1-t),t)\in M_f$, but I don't think their composition is homotopic to the identity, so possiblely I just came up with a wrong map.
Any hint or solution is appreciated. Thanks in advance.


Lemma: Let $A\subseteq X$ be a cofibration and $f\simeq g:A\rightarrow Y$ homotopic maps. Then the adjunction spaces $X\cup_fY$ and $X\cup_gY$ are homotopy equivalent.

This is Proposition 0.18 on pg. 16 of Hatcher's Algebraic Topology. The statement is for a CW pair $(X,A)$, but you'll notice that the proof only requires the subspace $A\subseteq X$ to have the homotopy extension property.
Now, to use the lemma we recognise the mapping torus of $f:X\rightarrow X$ as the pushout of the span
$$X\times I\xleftarrow{i_0+i_1}X\sqcup X\xrightarrow{id_X+f}X$$
where $i_a:X\hookrightarrow X\times I$ for $a=0,1$ is the inclusion $i_a(x)=(x,a)$. The left-pointing arrow above is a cofibration since it is the pushout product of the two cofibrations $\emptyset\hookrightarrow X$ and $\partial I\hookrightarrow I$. A homotopy $f\simeq g$ induces a homotopy of $id_X\sqcup f\simeq id_X\sqcup g$, and we apply the lemma to get a homotopy equivalence $M_f\simeq M_g$.
