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 define the partition composed of the pairs for and of singletons if \ and .

Let R be the equivalence relation defined by the partition and let Y be the quotient space / and let be the quotient map.

(a) Prove that there exists a continuous map such that for every and .

(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).