By definition of \(h_*, k_*\text{,}\) we must show that \([h\circ f]=[k\circ f]\) for all loops \(f\in P(X; x_0,x_0)\text{:}\) equivalently, we must show \(h\circ f\simeq_p k\circ f\text{.}\) This of course is where \(H\) comes in. Define \(G\colon I\times I\rightarrow Y\) as \(G(s,t)=H(f(s),t)\text{.}\) We see that
\begin{align*}
G(s,0) \amp = H(f(s),0) \amp G(s,1)\amp = H(f(s),1) \\
\amp = h(f(s)) \amp \amp =k(f(s)\\
\amp =h\circ f(s) \amp \amp =k\circ f(s)\text{,}
\end{align*}
showing that \(G\) is a homotopy from \(h\) to \(k\text{.}\) It remains to show it is a path homotopy. This follows since
\begin{align*}
G(0,t) \amp = H(f(0),t)=H(x_0,t)=y_0\\
G(1,t) \amp =H(f(1),t)=H(x_0,t)=y_0
\end{align*}
for all \(t\in I\text{.}\)