Motivation:
For any two points $y_{1},y_{2}\in Y$, there are disjoint open sets containing $y_{1}$ and $y_{2}$ separately, as $Y$ is a $T_{2}$-space. Say $f(x_{1})=y_{1}$ and $f(x_{2})=y_{2}$. Then, taking the inverses of the disjoint open sets, we get disjoint open sets containing $x_{1}$ and $x_{2}$ separately.
Why the inverses of disjoint open sets are also disjoint is if there was one point in common between two open sets in $X$ and not in $Y$, then that point would mapped to two different points in $Y$, one in each disjoint set, which is impossible.
Remember $f$ is one-to-one. Hence, as there are disjoint open sets for every $y_{i}$ and $y_{j}$, there are correponding open sets for every $x_{i}$ and $x_{j}$. Doesn't this make $X$ a Hausdorff space too?