For a non-empty subset $A$ of $\mathbb{R}^n$, and any $x\in \mathbb{R}^n$, define $d(x,A)=\inf\{ |x-a|\colon a\in A\}$. The problem is to show that if $A$ is closed and for any $r>0$, the set $\mathcal{O}=\{ y\in\mathbb{R}^n\colon d(y,A)<r \}$ is open.
I tried it to verify geometrically: consider any $x\in\mathcal{O}$. Let $d(x,A)=l$. Clearly, $0\leq l<r$. I considered the ball $B(x,r-l)$, but failed to prove that it is in $\mathcal{O}$. I don't know whether this is correct to prove, but as per my intuition, I thought it is true.
Please, give suggestion.
Adding a small question to initially posted: to prove that $\mathcal{O}$ is open, is it necessary to assume $A$ is closed? Or can we consider $A$ as any non-empty subset of $\mathbb{R}^n$.