This is from Lawvere's Conceptual Mathematics in a section about fixed points:
Suppose that $A$ is a retract of $X$, i.e. there are maps $r\colon X \to A$ and $s\colon A \to X$ such that $r \circ s = 1_A$. Suppose that $X$ has the fixed point property from maps from $T$, i.e. for every endomap $f\colon X \to X$, there is a map $x\colon T \to X$ for which $fx = x$. Show that $A$ also has the fixed point property for maps from $T$.
Proof: Let $g\colon A \to A$ be an arbitrary endomap. Notice that $sgr\colon X \to X$ so there is an $x\colon T \to X$ such that $sgrx = x$. Apply $r$ to both sides to get $rsgrx = rx \implies grx = rx$ because $rs = 1_A$. Thus, $rx$ is a fixed point of $g$. Therefore, $A$ has a fixed point $rx\colon T \to A$ for any $g\colon A \to A$.
EDIT: I corrected my proof corresponding to AMath's comments and I believe it is correct now. Thank you!
The Fixed point property as you’ve defined above means, for any endomap $f:A\rightarrow A$ there is a fixed point $x:T\rightarrow A$. While you have only shown this for the endomap $rs$. But your idea is right, you just need to start with an arbitrary endomap on $A$.
Hint: if that gives you an endo map on $X$, you can use the fixed point property there.