I'm learning about homotopy equivalences of spaces.
In this example, what I don't understand is that, while the codomain of the function $H(y,t)$ is $Y$, isn't it the case that $H(y,1)=g(y)$ is a function of co-domain $X$? Shouldn't the co-domain always be $Y$?
Similarly, in the next example, doesn't h(x,t) have co-domain X, but h(x,0)=r(x) have co-domain A?

