In any metric space prove that every open set is $G_{\delta}$ set and every closed set is $F_{\sigma}$ set.(Hint: use the continuity of $x\longmapsto d(x,A)$.)
I tried to prove this by saying: If $U$ is a open set, consider $\bigcup_{i=0}^{\infty} A_{n}$, where $A_{n}=\bigcup_{x\in U} B(x,1+1/n)$ and $A_{0}=U$.
Hence every Open set is $G_{\delta}$ set.
Also I didn't get how to use the hint to solve the problem. Thanks in advance.