Give X the discrete topology (induced by the discrete metric).
Then consider . In the discrete topology every set is open and therefore every set is closed, thus the closure of this set is itself, as it is already closed.
But now consider your other set since everything is distance 1 from x. If X has more than one point it is clear that these sets are not the same.