An embedding that is a closed map 
Suppose $f:A \rightarrow B$, $g:B \rightarrow A$, such that $gf=1_A$. If $B$ is Hausdorff, then $f$ is a closed map. 

Any hints would be really appreciated. 
 A: Hint: Use the characterization of closedness with nets : if $F$ is closed and $(f(y_i))$ is a converging net in $B$, what can you say about $(y_i)$ ? 

 Let $F$ be closed in $A$; $(x_i)$ a converging net in $f(F)$, call $x$ its limit. Write $x_i = f(y_i)$ for some $y_i\in F$. Then $x_i \to x$ implies $g(x_i)\to g(x)$ but $g(x_i)= y_i$ so $y_i\to g(x)$. Note that $g(x) \in F$ because $F$ is closed and $y_i \in F$. Thus $f(y_i)\to f(g(x))$; $x_i\to f(g(x))$. But $B$ is Hausdorff, so $(x_i)$ has at most one limit: $x=f(g(x))$. In particular, $x\in f(F)$. Any converging net in $f(F)$ has its limit in $f(F)$: thus $f(F)$ is closed; and so $f$ is closed. 

A: $f$ is an embedding because it has a left inverse. Hence w.l.o.g. we may assume that $A \subset B$ and $f$ is the inclusion. This means that $A$ is a retract of $B$. To show that a retract of a Hausdorff space is closed has been several times asked and answered in this forum, e.g.
Why does this argument show that a retract of a Hausdorff space is closed?
Show that a retract of a Hausdorff space is closed.
A: There is a more general statement. Let  $h,k: A \to B$  be continuous functions. If $B$ is Hausdorff, the the set $C_{h,k}=\{a \in A: h(a)=k(a) \} $ is closed in $A$. 
Proof We know that $B$ is Hausdorff if and only if the diagonal $\Delta_B$, i.e. the set of elements $(b,b)\in B \times B: b \in B$ is closed in $B \times B$.
 But $C_{h,k}= (h,k)^{-1}(\Delta_B). $ QED
For the question  at issue, we look at $h=fg, k=1: B \to B$. 
A: I assume that $f, g$ are continuous. Let $b$  be an element of the closure of $f(A)$.  Since $B$ is Hausdorff, we have  $b= lim_nf(a_n)$. Since $g$ and $f$ are continous, $lim_ng(f(a_n))=a_n =g(b) $ and  $lim_nf(a_n) =f(g(b)) =b$. Since a limit is unique in an Hausdorff space. 
