You're glossing over the most important things. You are given the information that $X$ is contractible. This means that there exists a specific homotopy $H:I\times X\to X$ which contracts the identity map. Your goal is to construct a specific homotopy $H':I\times A\to A$ which contracts the identity map. Your proof never explicitly makes use of $H$ and never explicitly (maybe not even implicitly) defines $H'$. This makes it feel like a bunch of symbol-pushing. (This isn't meant to be insulting; I'm just explaining why the proof feels unsatisfying.)
Two preliminary points:
$\newcommand{\pt}{{\{\ast\}}}f'=f\circ r$ isn't a map between the right things; it should be a map $A\to\pt$, but it's a map $X\to \pt$. This isn't too important since there's only one map from anything to a point, but the algebraic manipulation will be clearer if you set $f':=f|_A$.
You don't need to check $f'\circ g'\cong id_\pt$ since there's only one map $\pt\to\pt$.
So you only need to find a homotopy from $id_A$ to $g'\circ f'$. That is, you need to make a movie (homotopy) which continuously crushes $A$ to a point. But you already have a movie $H:I\times X\to X$ which crushes $X$ to a point (i.e. $H(0,-)=id_X$ and $H(1,-)=g\circ f$), and you have a way to retract anything in $X$ to something in $A$, so you can just retract your movie, setting $H' = r\circ H|_{I\times A}$. Then $H'(0,-) = r\circ H(0,-)|_A = r\circ id_A = id_A$ and $H'(1,-)=r\circ H(1,-)|_A = r\circ (g\circ f)|_A = r\circ g\circ f|_A = g'\circ f'$.
I'm going to deal with the first statement, that $CX$ is contractible.
Consider the map $H: X \times{[0,1]} \times{[0,1]}$ $ā$ $X
\times{[0,1]}$ defined by $H((x,t),s) = (x(1-s)t)$. Then $H$ is
continuous and $H((x,0,s) = (x,0)$ for all $xāX$ and $sā[0,1]$.
Here you show that, whenever two points get identified, namely when they are of the form $(x,0,s)$ and $(x',0,s)$ for $x,x'\in X,s\in I$, then they have the same image $[(x,0)]$.
$H$ induces a continuous map $\hat{H}$: $CX \times [0,1] ā CX$ such that
$\hat{H}([(x,t)],s) = [(x,(1-s)t)]$. Now $\hat{H}[(x,t)],0) =
[(x,t)]$ and $\hat{H}[(x,t)],1) = [(x,0)] = X \times${$0$}. So
$\hat{H}$ is a homotopy in $CX$ from the identity on $CX$ to the point
$X \times${$0$}. Consequently, $CX$ is contractible.
All your computations are correct. The function $\hat H$ starts with the identity and ends with a retraction $r:CX\to \{X\times\{0\}\}$ (Note that this is also relative $X\times\{0\}$, it is independent of the time $s$ on that subspace, so you actually have a deformation retraction $r$). The only problem here is that $\hat H$ is continuous only when $q\times\text{id}_I:X\times I\times I\to CX\times I$ is a quotient map. But in general, a product map $q\times\text{id}_Y:X\times Y\to Z\times Y$, where $q$ is a quotient map, is not necessarily a quotient map. Luckily, in your case it is, and this is because $I$ is locally compact and $q\times\text{id}_Y$ is a quotient map for each locally compact $Y$. For a proof see theorem 4.3.2 in the book Topology and Groupoids.
Best Answer
Yes, I think all that is exactly right. In fact $H$ appears to give a strong deformation retraction to $\{\gamma_*\}$, since it's constant on $\gamma_*$.
The only slightly unclear part to me is why $H$ is continuous. Checking that requires going into the topology defined on $PX$. But that shouldn't be hard.