Let's fix some notation first.
is the set denotes the boundary of .
is the complement of the boundary of .
We have given that ,where is a metric space.
Claim1: No points in can be the limit points of
Proof: Suppose on the contrary there exist at least one point is limit point of .
Thus, for every there exist an open ball
such that
but if we choose small enough ,such always exist ,we get
Hence contradicting the hypothesis that is limit point of . This can be easily seen in the below rough figure
Clearly, the ball inside and outside does not intersect with boundary . Hence, proved.
Thus claim1 guaranteed that if has limit points then it must be on .
Claim2: Every point on the boundary is limit point of
Proof:let for any arbitrary point ,thus for every there exist an open ball such that
which is very clear from the above rough sketch, hence is the limit point of .
As, is arbitrary,thus every point of is limit point of every limit points of are contained in . Hence proved.
Therefore immediately from Claim 2, is close set.
Hence, we are done.