This is problem 4.7.11 of O'Neill's Elementary Differential Geometry, second edition. The hint says to use the Hausdorff axiom ("Distinct points have distinct neighborhoods") and the results of fact that a finite intersection of neighborhoods of p is again a neighborhood of p.
Here is my attempt at a solution. At a key step it makes an assertion without proof.
Consider a point p in M-R. To show that p has a neighborhood outside of R, we need a lower bound on the distance of p from R.
For every $\epsilon>0$ the set of all neighborhoods of points in R covers R, so the neighborhoods of a finite set S of points in R covers R. Let q be the point in S that is closest to p. The point in R that is closest to p might be in the $\epsilon$ neighborhood of q. If so, the distance of p from R is greater than or equal to $d(p,q)-\epsilon$. If we choose $\epsilon<d(p,q)$ then the distance of p from R is greater than zero, and there is a neighborhood of p in $M-R$ and so M-R is open and R is closed.