No one answered this week's problem. You can read my solution below.
Let $f : X' \to X$ be a cofibration, and let $M_f$ denote the mapping cylinder of $f$. Consider the projection map $g : X \to Z_f$ and the map $G : X' \times I \to M_f$ sending $(x',t)$ to the equivalence class of $(x',1-t)$. For every $x'\in X'$, $gf(x') = [f(x')] = [(x',1)] = G(x',0)$. Since $f$ is a cofibration, there is a map $\Phi : X\times I \to M_f$ such that $\Phi(x,0) = [x]$ for all $x\in X$ and $\Phi(f(x'),t) = [(x',1-t)]$ for all $x'\in X$ and $t\in I$. Hence, given $a',b'\in X'$ with $f(a') = f(b)'$, we have $\Phi(f(a'),1) = \Phi(f(b'),1)$, or $[(a',0)] = [(b',0)]$. Therefore $a' = b'$, showing that $f$ is injective.