Let $i:A \to X$ be an inclusion in the topological sense. I want to show the equivalence of the following two statements:
There exists a retraction $r: X\times I \to A\times I \cup X\times \{0\}$
$i:A \to X$ is a cofibration; therefore for every $f:X \to Y, h:A \times I \to Y$ with commuting $f \circ i = h (-, 0)$ there exists a homotopy $H: X \times I \to Y $ with $ H \circ (i \times id) =h$.
"$\implies$" 1): By choosing $Y= A\times I \cup X\times \{0\} $, $h$ and $f$ as canonical inclusions from $X, A \times I$ to $A\times I \cup X\times \{0\} $, I get $H$ by the cofibration property: $X \times I \to Y$. My intention is to prove that $H$ is my retraction. Therefore it suffices to find an $s:Y \to X \times I$ such that $H \circ s = id_Y$. According to universal property it suffices to find $a: X \cong X \times {0} \to X \times I$ and $b:A \times I \to X \times I$ such that $H \circ a$ and $H \circ b$ were inclusions into $Y$. For $b$ I choose $i \times id$ so by definition of $h$ as inclusion I get $h = H \circ b$. My problem is now to find $a: X \to X \times I$ such that $H \circ a$ is an inclusion from $X$ to $Y$.
Now "$\implies$"2): There is given a retraction. Firstly I observe that the canonical inclusion maps $i_X: X \times \{0\} \cong X \to A\times I \cup X \times \{0\}$ and $i_{A \times I}: A \times I \to A\times I \cup X\times \{0\}$ can be extended to $r: X\times I\to A\times I \cup X\times \{0\}$ such that $r(i(a),t)=(a,t)$ and $r(x,0)=x$. This $r$ is a retraction of $s: A\times I \cup X\times \{0\} \to X\times I$ defined as $x \to (x,0)$ and $(a,t) \to (i(a),t)$. Therefore $f:X\times\{0\}\cong X \to Y$ and $h:A\times I\to Y$ are satisfying $h(a,0)=f(a,0) \cong f(a)$, which induces a unique map $\tilde H: A\times I \cup X\times \{0\} \to Y$ according to a universal property such that $\tilde Hi_X=f$ and $\tilde H i¬{ A \times I }=h$. Define $H=\tilde Hr:X\times I\to Y$, we have $H(x,0)=f$ and $H(a,t)=h(a,t)$.
My problem here is to use the assumed information because I can construct the $H$ for the given pair $f, h$ without using the $\textit{given}$ retraction. Where is the devil?
For $2)\Rightarrow 1)$. Let $F:A\times I\hookrightarrow X\times 0\cup A\times I$ be the inclusion which defines a homotopy starting from the restriction of $i_0:X\cong X\times 0\hookrightarrow X\times 0\cup A\times I$. Since $A\hookrightarrow X$ is a cofibration there is an extension $r:X\times I\rightarrow X\times 0\cup A\times I$ of $F$ with the required properties.
For $1)\rightarrow 2)$. Assume given a map $f:X\rightarrow Y$ and a homotopy $F:A\times I\rightarrow Y$ starting from $f|_A$.We get an extension $F'=F\cup f:A\times I\cup X\times 0$ using the glueing theorem since these maps agree on $A\times 0$. Now define $H:X\times I\rightarrow Y$ by $H=F\circ r$. Then $H(x,0)=F'\circ r(x,0)=F'(x,0)=f(x)$ and $H(a,t)=F'\circ r(a,t)= F(a,t)$. So $H$ is a homotopy with the required properties for $A\hookrightarrow X$ to satisfy the $HEP$. That is, for it to be a cofibration.