$X$ is contractible if and only if it is a retract of any cone over $X$ The first exercise given in Spanier's, Algebraic Topology is:

$X$ is contractible if and only if it is a retract of any cone over $X$.

I have proven the first implication, however I am stuck on the second implication. 
In Spanier he defines a cone over a topological space $X$ with vertex $v$ as the mapping cylinder of the constant map $X\rightarrow v$. In addition he denotes the mapping cylinder as $Z_{f}$.
Starting with the second statement that $X$ is a retract of any cone over $X$, I have shown  it is certainly a retract of $Z_{c}$ where c is the constant map from $X$ to $x_{0}$ for some $x_{0}\in X$ and I've also shown that $P$ can be imbedded as a weak deformation retract of $Z_{c}$, where $P$ is the one point space containing $x_{0}$.
Now in Spanier there is a theorem stating:

Two spaces $X$ and $Y$ have the same homotopy type if and only if they can be imbedded as weak deformation retracts of the same space $Z$.

Since I have shown $P$ can be imbedded as  weak deformation retract of $Z_{c}$ and since $X$ is already a retract of $Z_{c}$ then it suffices to show $Z_{c}$ is deformable into $X$ to complete the proof.
So first I wanted to know if this is a good way of attacking the proof and if I haven't stated anything incorrectly? If so, then I wanted to know of any way to show $Z_{c}$ is deformable into $X$?
I just started this book and so my knowledge of algebraic topology is only up to the fourth section of Spanier.
 A: I think you're trying too hard. Note that for any cone $CX$ over a point $v$, $CX$ deformation retracts onto $v$, and in particular is contractible. By hypothesis $X$ is a retract of a contractible space, so it must be contractible. 
A: A space $X$ is contractible iff the map $p:X\to \{*\}$ is a homotopy equivalence, i.e. iff there exists a map $q:\{*\}\to X$ such that $pq\simeq 1$ and $qp\simeq 1$.  Since $pq$ is a map from $\{*\}$ to itself, it is always equal to the identity.  So the only thing to check is that $qp\simeq 1$.  Now the choice of $q$ is equivalent to a choice of a point $a\in X$, and then $qp$ is just the constant function $a:X\to X$.
So $X$ is contractible iff there is a homotopy from the identity map on $X$ to a constant map.  Such a homotopy is a map $H:X\times[0,1]\to X$ such that $H(x,0)=x$ and $H(x,1)=a$ for all $x$ and some fixed $a$.  By the universal property of quotient spaces, there is a bijection between such maps $H$ and maps $\tilde{H}:X\times[0,1]/X\times\{1\}\to X$ such that $\tilde{H}(x,0)=x$.  But $X\times[0,1]/X\times\{1\}$ is just the cone on $X$, and the condition that $\tilde{H}(x,0)=x$ says exactly that $\tilde{H}$ is a retraction from this cone to $X$, its base.
