I've read online that "Intuitively, two spaces X and Y are homotopy equivalent if they can be transformed into one another (i.e., made homeomorphic) by bending, shrinking and expanding operations", for example on Wikipedia. Am I to assume then that if I have two spaces $X,Y$ and two continuous functions $f:X\to Y,$ $g:Y\to X$ such that $f\circ g$ and $g\circ f$ are homotopic to the identity functions, then $f\circ g(Y)$ and $g\circ f(X)$ are homeomorphic? If not, then what's with the "intuition"? I've tried to figure it out and also searched online but haven't found nothing.
Edit: To be more clear, my question roughly is if $X,Y$ are homotopy equivalent, are there necessarily subsets $X'\subset X$ and $Y'\subset Y$ such that $X'$ is homotopy equivalent to $X$ with inclusion, $Y'$ is homotopy equivalent to $Y$ with inclusion, and $X',Y'$ are homeomorphic?
But I'll accept an answer that is "homotopy equivalent" to this one.
Homotopy is a much looser equivalence than homeomorphism. As an example, the circle $X = S^1$ and the punctured plane $Y = \Bbb{R}^2 \setminus \{0\}$ are homotopy equivalent, but they are not homeomorphic.
To see the homotopy equivalence explicitly, let $f: X \hookrightarrow Y$ be the natural inclusion, and let $g: Y \to X$ be the radial projection, defined by $$ g(y_1, y_2) = \Bigl( \frac{y_1}{r}, \frac{y_2}{r} \Bigr), \qquad \text{where } r = \sqrt{y_1^2 + y_2^2}. $$
In one direction, $g \circ f = \operatorname{Id}_X$ on the nose (so the constant homotopy suffices).
Now, consider $f \circ g: Y \to Y$. Now, the map $H: Y \times [0, 1] \to Y$, defined by $$ H(y, t) = \biggl( \frac{y_1}{r + (1-r)t}, \frac{y_2}{r + (1-r)t} \biggr), \qquad \text{where } r = \sqrt{y_1^2 + y_2^2} $$ is a homotopy satisfying $f \circ g = H( \;\cdot\;, 0)$ and $H( \;\cdot\;, 1) = \operatorname{Id}_Y$.
(This is an example of deformation retraction.)