Show that a retract of a contractible space is contractible. - Is this proof legit? I am wondering if my proof is correct? Thank you very much.

Show that a retract of a contractible space is contractible.

Given $X$ contracts to $x \in X$, we know there is a family of maps $f_t: X \to X, t \in I$, such that $f_0 = \mathbb{I}$ (the identity map), $f_1(X) = x$, and f_t|x=  \mathbb{I} for all t.
Consider a retract on $X$ to $A$, we know there is a map $r: X \to A$, such that $r(X) = A$, $r|_A = \mathbb{I}|_A$.
And now we set out to show that $A$ contracts to any $a \in A$, that is, there exists $\hat{f}$ such that $\hat{f}_t: A \to A, t \in I$, such that $\hat{f}_0 = \mathbb{I}$, $\hat{f}_1(A) = a$ , and f_t|a=  \mathbb{I} for all t .
But since $X$ retracts to $A$, that means $r$ brings any point $x \in X$ to some $a^\prime \in A$ homotopically. Therefore, we have a map from $X$ to $a^\prime$, which is the $\hat{f}$ we want when restricts to $A$. That is,
$$\hat{f}_t = r \circ f_t,$$
because it satisfies all the criterion we want:
$\hat{f}_0|_A = r \circ f_0|_A = r \circ \mathbb{I}|_A = \mathbb{I}|_A$, $\hat{f}_1(A) = r \circ f_1(A) = r \circ x = a^\prime$ which satisfy the condition that \hat{f}_1(A) = a for any a \in A, and f_t|a^\prime=  \mathbb{I} for all t.

There are still some inconsistencies in your text:

Consider a retract on $X$ to $A$, we know there is a map $r:X→A,$ such that 
  $r(X)=A,$ $r(A)=A.$

This still has to be corrected. It should better say: "$r:X\to A$ such that $r|_A=\Bbb I|_A$"

$\hat f_1(A)=a$ for any $a∈A$

That can be deleted. You already know that $\hat f_1(A)=\{a'\}$ and that is all you want.
