Prove that $f_A (x) = d({\{x}\}, A)$, is continuous. Prove that: 

Let $(X, d)$ be a metric space, and let $A$ be a subset of $X$. The function $f_A\colon X\rightarrow \mathbb{R}$, defined by $f_A (x) = d({\{x}\}, A)$, is continuous. 


Honestly, I have NO idea where to start. I need to prove that inverse of an open set in $\mathbb{R}$ is open $X$. What it makes it hard to approach is the definition involved: $$d(A, B) = \operatorname{glb}\{d(a, b)\mid a \in A, b \in B\}.$$ 
Would someone please guide me how to solve this question?
Thank you. 
 A: Since $f_{A}$ is a map between metric spaces (each with the topology induced by its metric), we can use the $\epsilon$–$\delta$ definition of continuity: $f_{A}$ is continuous at a point $x\in X$ if for all $\epsilon>0$ there exists $\delta>0$ such that $|f_{A}(y)-f_{A}(x)|<\epsilon$ if $|x-y|<\delta$.
So, take any $x\in X$ and any $\epsilon>0$. Consider $y$ near $x$. Intuitively we expect $f_{A}(y)$ to be close to $f_{A}(x)$. We can show this formally using the triangle inequality, which tells us that $d(y,a)\leq d(y,x)+d(x,a)$ for all $a\in A$. Rearranging, $d(y,a)-d(x,a)\leq d(y,x)$. By the same argument, $d(x,a)-d(y,a)\leq d(y,x)$, so that $|d(y,a)-d(x,a)|\leq d(y,x)$. Because this holds for all $a\in A$, we can say that $|f_{A}(x)-f_{A}(y)|\leq d(x,y)$. In particular, $|f_{A}(x)-f_{A}(y)|$ will be less than $\epsilon$ whenever $d(x,y)<\epsilon$. Thus, $f_{A}$ is continuous at $x$. This holds for all $x\in X$, so $f_{A}$ is continuous.
A: The idea is to use the reverse triangle inequality: $$d(x,a) - d(y,a) \leq d(x,y), $$given $x,y \in X$, $a \in A$. But notice that $d(x,A) \leq d(x,a)$, so we get: $$d(x,A) - d(y,a) \leq d(x,y).$$Reorganize: $$d(x,A)-d(x,y) \leq d(y,a).$$Now take the infimum on $a$: $$d(x,A) - d(x,y) \leq d(y,A).$$Reorganize: $$d(x,A) - d(y,A) \leq d(x,y).$$Since $x$ and $y$ were arbitrary, we can swap the above inequality to obtain: $$d(y,A)-d(x,A) \leq d(y,x) = d(x,y).$$This gives: $$|d(x,A)-d(y,A)| \leq d(x,y).$$Now let $\epsilon > 0$, and check that $\delta = \epsilon > 0$ will work in the definition of continuity. Since $\delta$ does not depend on $x$ and $y$, the function is actually uniformly continuous (which is even better).
