## Hausdorff and continuity

I have been given a question that aims to demonstrate that the intersection of two compact subsets in a space that is not Hausdorff may not be compact and not closed. It takes you through step by step, but I can't do the first part:

Let X be a topological space and A a subset of X. On $X \times \{0,1\}$ define the partition composed of the pairs $\{(a,0), (a,1)\}$ for $a \in A$ and of singletons $\{(x,i)\}$ if $x \in X$ \ $A$ and $i \in \{0,1\}$.

Let R be the equivalence relation defined by the partition and let Y be the quotient space $[X \times \{0,1\}]$ / $R$ and let $p: X \times \{0,1\} \rightarrow Y$ be the quotient map.

(a) Prove that there exists a continuous map $f: Y \rightarrow X$ such that $f ( p(x,i)) = x$ for every $x \in X$ and $i \in \{0,1\}$.

(b) Prove that Y is Hausdorff iff X is Hausdorff and A is a closed subset of X. (For the direct implication I know that is the quotient space is Hausdorff the the graph of the equivalence relation is closed).