If $A\subset B\subset C$, $A$ is dense in $B$, and $B$ is dense in $C$ prove that $A$ is dense in $C$. 
If $A\subset B\subset C$, $A$ is dense in $B$, and $B$ is dense in $C$ prove that $A$ is dense in $C$.

Here's my answer:
$A$ is dense in $B$: $\bar{A}=B$
B is dense in $C$: $\bar{B}=C$
However $\bar{B}$ is the smallest closed set containing $B$.  Therefore $\bar{A}=\bar{B}$ and since $\bar{A}=C$, $A$ is dense in $C$.
My instructor gave me a 2/5, what did I did wrong?
 A: First, it is kind of bad form to answer with $X,Y,Z$ if the question was phrased in terms of $A,B,C$. But I wouldn't take you 60% off because of that. 
Regarding the question, note that when you say $\overline X=Y$, you are implying that $Y$ is closed, which is not necessarily the case. 
To give an intuitive example, you could have $X=\mathbb Q$, $Y=\mathbb R\setminus\{\sqrt2\}$, $Z=\mathbb R$. 
You could use your reasoning if you think in terms of relative topologies. But in that case you must indicate so when you answer the question. 
A: Presumably $A,B$, and $C$ are all subsets of some topological space $X$. The statement that $A$ is dense in $B$ does not imply that $\operatorname{cl}A=B$: it says only that $\operatorname{cl}A\supseteq B$. (After all, $B$ need not be closed.) Similarly, the statement that $B$ is dense in $C$ tells you only that $\operatorname{cl}B\supseteq C$. Then you can argue that $\operatorname{cl}A$ is a closed set containing $B$, so $\operatorname{cl}A\supseteq\operatorname{cl}B\supseteq C$, and therefore $A$ is dense in $C$.
In other words, your basic approach can be made to work, but you made a pretty significant mistake when you said that $\operatorname{cl}A=B$. (I’m sticking with the original letters; there was no good reason to change them.) I might have made it $3/5$, but I can’t say that $2/5$ is horribly unreasonable.
A: HINT: Just because $\bar Y$ is the smallest closed set containing $Y$ does not imply $\bar Y = Y$ (from $\bar X = Y$); take for example $Y = \mathbb{Q}$. 
