Let {a,b} be set of two points and {c} be a set of one point.
Clearly, $f:\{c\} \rightarrow \{a,b\}$ that is continuous and $g:\{a,b\} \rightarrow \{c\}$ is continuous.
Now $gf:\{c\} \rightarrow \{c\}$ So $gf(c)=c=id_{\{c\}}$
However, need to show that fg fails. But, I can't see what you use. Clearly, two points are being map into 1 point as we have $fg:\{a,b\} \rightarrow \{c\} \rightarrow \{a,b\}$ So you can WLOG $fg(a)=a$ and $fg(b)=b$. But, then you want to say that this can't be homotopic to the identity $fg(a)=a$ and $fg(b)=b$.
I don't know what to do next.Hmm you need to show that there is no continuous path from that constant to the identity map. It has to jump somewhere, but I don't really know how you would describe it. Like you have H(x,t). If you have $H(x,1)=id_{x}$ and H(x,0) is the map that is mapping to a for all values. It must jump inbetween the value of 0 and 1. However, don't know how you would do it properly.