For a topological space $X$ and its subspace $A$, we say that $A$ is a retract of $X$ if there is a continuous map $f \colon X \to A$ such that $f(x)=x$ for every $x \in A$.
The Hilbert cube $Q$ is the space $[0,1]^{\mathbb{N}}$ equipped with the product topology.
I'm trying to prove that if $X$ is a topological space homeomorphic to a retract of the Hilbert cube, then $X$ is a retract of every compact metrizable space it is embedded into. I would be able to prove this if I knew how to show the following:
If $Y \subseteq Q$ is a retract of $Q$ and $Z \subseteq Q$ is homeomorphic to $Y$, then $Z$ is a retract of $Q$.
I'll appreciate any help.
Let $f\colon Q\to Y$ be a retract of $Q$, so such that $f(x)=x$ for any $x\in Y$.
Let $g\colon Y\to Z$ be an homeomorphism between $Y$ and $Z$.
If there exists an extension of $g^{-1}\colon Z\to Q$ to the entire $Q$, i.e., if there is a continuos map $h\colon Q\to Q$ such that $h(t)=g^{-1}(t)$ for any $t\in Z$, then you are done.
In fact the retract of $Z$ is
$$g\circ f\circ h\colon Q\to Z$$
because for any $x\in Z$ you have
$$(g\circ f\circ h)(x)=g(f(g^{-1}(x))=g(g^{-1}(x))=x$$
Conversely, if there exists such retract $F\colon Q\to Z$, then $h:=g^{-1}\circ F\colon Q\to Y$ is the extension of $g^{-1}$.
Thus necessary and sufficient condition for the existence of this retract is that there exists an extension $h\colon Q\to Q$ of the homeomorphism $g^{-1}\colon Z\to Y$. (For example this always follows if $g$ is defined like the restriction of $Y$ of an automorphism of $Q$ sending $Y$ to $Z$. Or for example the statement follows if $Z$ is dense in $Q$ and $Q$ is Hausdorff and first countable).
In general I don’t know if there is a counter-example of an homemomrphism $t\colon Z\to Y$ that is not an extension of a continuos map of $Q$ and such that $Y$ is a retract of $Q$.
In any case, as we discussed, your $Q$ is $[0,1]^{\mathbb{N}}$ and it holds Tietze extension theorem for $g^{-1}\colon Z\to Y\subset Q$, when $Z$ is a closed set of $Q$. In your case $Z$ is always closed. In fact $Y$ is compact because is the continuos image of $Q$ with respect to the retract. So also $Z$ is compact too, because is homeomorphic to $Y$. Hence $Z$ is closed too, being $Q$ Hausdorff.