This is Exercise 3.10(a) from Hartshorne. Can someone verify my solution? Thanks.
Exercise 3.10(a): If $f:X\to Y$ is a morphism, and $y\in Y$ is a point, show that $\operatorname{sp}(X_y)$ is homeomorphic to $f^{-1}(y)$ as topological spaces with the induced topology.
Here, $X_y = X\times_{Y} \operatorname{Spec} k(y)$.
Let $f^{-1}(y)\to X$ be the inclusion map, and $f^{-1}(y)\to \operatorname{Spec}k(y) = \{ \text{pt} \}$ be the constant map. These maps commute with their natural maps into $Y$. Therefore, $f^{-1}(y)$ factors through the fibre product by the universal property, and we obtain the map in one direction $$ \gamma: f^{-1}(y)\to X_y $$
However, it is clear that the natural projection $$ X_y\to X $$ has image in $f^{-1}(y)$ by looking at the commutative diagram of the universal property, and hence it defines $\gamma^{-1}$, making $\gamma$ a homeomorphism.
EDIT 1: I suppose I'll have to first treat $f^{-1}(y)$ as some kind of subscheme of $X$ in order to apply the universal property, i.e. I should probably give it a natural structure sheaf (if it is possible).