Let $X$ and $Y$ be topological spaces and $f :X \to Y$ a homotopy equivalence, $x_0 \in X$ and $y_0=f(x_0)$. Show that if $\{y_0\} \to Y$ is a cofibration, then $f$ has a homotopy inverse $g$ for which $g(y_0)=x_0$.
So since $f$ is a homotopy equivalence there exists $g :Y \to X$ with $f\circ g \simeq \operatorname{id}_Y$ and $g\circ f \simeq \operatorname{id}_X$.
Since $\{y_0\} \to Y$ is a cofibration for any topological space $X$ and homotopy $H: \{y_0\} \times I \to X$ there exists $\widetilde{H}:Y \times I \to X$ such that the following diagram commmutes:
The existence of $g$ is coming from $f$ being a homotopy equivalence so the hard part is showing that $g(y_0)=x_0$.
I had the imperssion that I could use one of the homotopies $g :Y \to X$ with $f\circ g \simeq \operatorname{id}_Y$ or $g\circ f \simeq \operatorname{id}_X$ here in place of $H$, but the latter one does not work since it's a map $H : X \times I \to X$ and for the former I couldn't make it work.
What can I do here?

Let $g$ be any homotopy inverse to $g$ and $H\colon \{y_0\}\times I\to X$ be a path from $g(y_0)$ to $x_0$. Then if $\tilde{H}\colon Y\times I\to X$ makes your diagram commute, it is a homotopy from $g$ to a map $g'$ such that $g'(y_0)=x_0$. Since $g$ is homotopy inverse to $f$, so is $g'$.