Let $S$ be an arbitrary scheme, and let $X,S'$ be $S$-schemes.
Using e.g. EGA I (3.3.9), (3.3.14), one obtains for any $S'$-scheme $T$, viewed as an $S$-scheme via $S'\to S$, a canonical bijection of sets: $$f_X:Hom_{S'}(T,X_{S'})\cong Hom_S(T,X).$$
For any morphism $\varphi:X\to Y$ of $S$-schemes, let $\varphi^*:Hom_{S}(T,X)\to Hom_{S}(T,Y)$ be the induced map and let $\varphi_{S'}:X_{S'}\to Y_{S'}$ be the induced morphism of $S'$-schemes.
I suspect that the by $\varphi_{S'}$ induced map
$$\varphi_{S'}^*:Hom_{S'}(T,X_{S'})\to Hom_{S'}(T,Y_{S'})$$
satisfies $\varphi_{S'}^*=f_Y^{-1}\circ \varphi^*\circ f_X$. In case this is true, is there a simple way (which avoids working out all canonical maps involved) to see this?