Exercise 4, Section 18 of Munkres Topology 
Given $x_0 \in X$ and $y_0 \in Y$, show that the maps $f:X\to X\times Y$ and $g:Y\to X\times Y$ defined by $f(x)=x\times y_0$ and $g(y)=x_0\times y$ are imbeddings.

My attempt: let $x,x’\in X$. Suppose $f(x)=f(x’)$. That means $x\times y_0 =x’\times y_0$. Thus $x=x’$. $f$ is injective. $f:X\to X\times Y$ defined by $f(x)=(f_1(x), f_2(x))= x\times y_0$. So $\pi_1 \circ f=f_1: X\to X$ and $\pi_2 \circ f=f_2: X\to \{y_0\}$. $f_1$ is the identity map and since domain and codomain are equipped with same topology, $f_1$ is homeomorphism, in particular $f_1$ is continuous. $f_2$ is continuous, since it’s a constant function, theorem 18.2(a). By theorem 18.4, $f$ is continuous.
Now we work with the map $f’:X\to X\times \{y_0\}$. It is clear that image set $f(X)=X\times \{y_0\}$. Set $X\times \{y_0\}$ equipped with $\mathcal{T}_{S}$ topology, where $\mathcal{T}_{S}$ is the subspace topology of $\mathcal{T}_{X\times Y}$. It is easy to check $f’$ is bijective. By theorem 18.2(e), $f’$ is continuous. There are two ways to show $(f’)^{-1}$ is continuous. (1) The map $(f’)^{-1}:X\times \{y_0\} \to X$ defined by $(f’)^{-1}(x\times y_0)=x$ is precisely $\pi_1$ map with domain restricted from $X\times Y$ to $X\times \{y_0\}$. By theorem 18.2(d), $(f’)^{-1}$ is continuous. (2) let $V\in \mathcal{T}_{X}$. $(f’)^{-1}(V)=V\times \{y_0\}$, by basic set theory. Note $(X\times \{y_0\})\cap (V\times Y)= V\times \{y_0\}\in \mathcal{T}_{S}$, since $(V\times Y)\in \mathcal{T}_{X\times Y}$. Hence $f’$ is homeomorphism. Thus $f$ is imbedding. Similar proof show $g$ is also imbedding.

This post is superposition of Exercise 4 from Munkres §18 and A careful solution to Problem 18.4 on page 111 of Munkres's Topology post. I think, this proof is more explicit and refined version of above two link(proofs). The notable difference is, I showed $f$ is continuous.

$f$ and $g$ are clearly injective. They are also continuous as each of their components is continuous so the maps $f^{\prime}: X \rightarrow X \times\left\{y_{0}\right\}$ and $g^{\prime}: Y \rightarrow\left\{x_{0}\right\} \times Y$ obtained by restricting the range of $f$ and $g$ respectively are continuous . It remains to prove that $f^{\prime}$ and $g^{\prime}$ are open maps. If $U$ is open in $X$, then $f^{\prime}(U)=U \times\left\{y_{0}\right\}=\left(X \times\left\{y_{0}\right\}\right) \cap(U \times Y)$ is open in $X \times\left\{y_{0}\right\}$, so $f^{\prime}$ is an open map. Similarly $g^{\prime}$ is an open map. It follows that $f$ and $g$ are imbeddings.
