How do I show that the following set is open? Let A,B be two subsets of metric space $X$ then show that the set $\{x \in X:d_A(x)<d_B(x)\}$ is open.
I was thinking of taking $r=d_B(x)-d_A(x) >0$.
Then $B_d(x;r)$ will be my desired ball.
I am stuck with the calculation to show that if $p \in B_d(x:r)$ then $d_A(p)<d_B(p)$.
Any hints would be helpful

The functions $d_A$ and $d_B$ are continuous, and therefore $d_B-d_A$ is continuous too. And your set is $(d_B-d_A)^{-1}\bigl((0,\infty)\bigr)$. So, since $(0,\infty)$ is an open subset of $\Bbb R$, your set is open.
