Composition preserves homotopy I have to prove that, given continuous functions between topological spaces $f,g:X\to Y$ and $h,k:Y\to Z$, we have
$$f\simeq g,\quad h\simeq k\qquad\Rightarrow\qquad hf\simeq kg.$$
I would like to ask if the following proof is correct. Since $f\simeq g$ and $h\simeq k$, there exist continuous functions
$$\varphi:X\times I\to Y\qquad\text{and}\qquad\psi:Y\times I\to Z,$$ with $I=[0,1]$ the euclidean interval, such that
$$\begin{cases}
\varphi(x,0)=f(x)\\
\varphi(x,1)=g(x)
\end{cases}
\qquad\text{and}\qquad
\begin{cases}
\psi(y,0)=h(y)\\
\psi(y,1)=k(y)
\end{cases}$$
for all $x\in X$ and $y\in Y$. Define $\tau:X\times I\to Z$ like this:
$$\tau(x,t)=\psi\big(\varphi(x,t),t\big).$$
Then $\tau$ should be continuous and such that
$$\begin{cases}
\tau(x,0)=hf(x)\\
\tau(x,1)=kg(x),
\end{cases}$$
so it should be a homotopy $\tau:hf\simeq kg$. Is this proof OK or did I get something wrong? Thank you very much!

The proof is alright, since the continuity of $\tau$ can be given by composition of $\varphi\times i_I\colon X\times I\to Y\times I$, by $(x,t)\mapsto (\varphi(x),t)$ and $\psi\colon Y\times I\to Z$.  
The composition $\tau$ has the property that $\tau(\cdot,0)=hf$ and $\tau(\cdot,1)=kg$, so the only thing that requires checking is the continuity of $\varphi\times i_I$ given the continuity of $\varphi$ and $i_I$.  But this is again trivial, since (at least) finite product of continuous maps are continuous.  
