What do paths have anything to do with homotopy equivalence? I don't understand how to solve this problem, it seems disconnected from the definition of homootpy equivalence

Let $X,Y$ be spaces with the underyling set $\{a,b\}$ for both but $\tau_=\{\phi,\{a,b\}\}$ and $\tau_Y=\{\{a\},\{b\},\{a,b\},\phi\}$. By considering paths from $a$ to $b$ in each $X,Y$, show that $X,Y$ are not homotopy equivalent.

If I recall correctly, $X,Y$ are homotopy equivalent if I can find some $f:X \to Y$ and $g:Y \to X$ such that there are homotopies $h:fg \cong id_Y$ and $k:gf \cong id_X$.
The problem is, the questions say paths within $X,Y$. Homotopy equivalence involves maps from and to $X$ and $Y$. I don't see how paths come into play at all.
Intuitively, it seems like $Y$ has the discrete topology and $X$ has the indiscrete topology so $Y$ is not path connected? While $X$ is? So...I don't recall any theorems that state that $X,Y$ must be both path-connected to be homotopy equivalent or so on... so I am stuck.
 A: If $f:X\to Y$ and $g:Y\to X$ are homotopy inverses, then there is a path from $g(f(x))$ to $x$ for each $x\in X$, given by restricting the homotopy $k$ to $\{x\}\times [0,1]$.  Since there is no non-constant path in $X$, this means $g(f(x))=x$ for all $x$.  This severely restricts what $f$ and $g$ can be, and you should be able to finish from here (note that not very many maps $f:X\to Y$ are continuous).
Much more generally, suppose $X$ is any topological space and let $\pi_0(X)$ denote the set of path-components of $X$.  Note that any continuous map $f:X\to Y$ induces a map $f_*:\pi_0(X)\to\pi_0(Y)$ by sending a path-component of $X$ to the path-component of $Y$ containing its image under $f$.  Note also that $(gf)_*=g_*f_*$ for maps $f:X\to Y$ and $g:Y\to Z$ and that if $f:X\to X$ is the identity map, then $f_*:\pi_0(X)\to\pi_0(X)$ is also the identity map.  Furthermore, note that if $f$ is homotopic to $g$, then the maps $f_*,g_*:\pi_0(X)\to \pi_0(Y)$ are equal, since there is a path in $Y$ from $f(x)$ to $g(x)$ for each $x\in X$.  (All of this can be summed up by saying that $\pi_0$ is a functor from the category of spaces and maps up to homotopy to the category of sets and functions.)
Now suppose $f:X\to Y$ and $g:Y\to X$ are homotopy inverses.  Then since $fg\cong 1_Y$ and $gf\cong 1_X$, we have $f_*g_*=1_{\pi_0(Y)}$ and $g_*f_*=1_{\pi_0(X)}$.  This means that $f_*:\pi_0(X)\to\pi_0(Y)$ and $g_*:\pi_0(Y)\to\pi_0(X)$ are inverse bijections.  In particular, $X$ and $Y$ must have the same number of path-components.
