Continuous function on metric space I'm trying to show:

Let $(X,d)$ be a metric space and let $A, B$ be nonempty subsets, which are also closed and disjoint. Let $\rho_A:X\to \mathbb{R}$ be such that $\rho_A=d(x,A)$ and $\rho_B:X\to \mathbb{R}$ be such that $\rho_B=d(x,B)$, with $x\in X$ (distance from one point to a set). 

Prove that the function $\frac{\rho_A}{\rho_A+\rho_B}:X\to \mathbb{R}$ is continuous in $X$.
I have only the definition of continuous function (with balls) and some results. I can not use yet sequences.
A corollary says that composition of continuous functions is a continuous function on metric spaces. Now, the sum of continuous functions is continuous (in the metric space $\mathbb{R}$) but the division of continuous functions is not necessarily a continuous function in $\mathbb{R}$.   
Any help? Thank you very much.
 A: You first need to show that the function $\rho_A$ (and $\rho_B$ ) is continuous.
If $A$ is any set, then let $\rho_A(x) = \inf_{a\in A} d(x,a)$. Now suppose $d(x,a) \leq \rho_A(x)+\epsilon$, then for any $y$ we have $d(y,a) \leq d(x,y)+d(x,a) \leq d(x,y)+\rho_A(x)+\epsilon$, from which is follows that $\rho_A(y)-\rho_A(x) \leq d(x,y)+\epsilon$. Reversing the roles of $x$ and $y$ shows that $|\rho_A(x)-\rho_A(y)| \leq d(x,y)+\epsilon$. Since this is true for arbitrary $\epsilon>0$, it follows that the $\rho_A$ is Lipschitz continuous of rank $1$. This is true for any set.
Now suppose $A$ is closed, and $x\notin A$. Then $\exists \epsilon>0$ such that if $d(x,y)< \epsilon$, then $y\notin A$. It follows that $d(x,a) \geq \epsilon$ whenever $a \in A$. Hence $\rho_A(x) \geq \epsilon > 0$. 
Since $A$ and $B$ are disjoint, it follows that for any $x$, either $x\notin A$ or $x\notin B$, hence $\rho_A(x)+\rho_B(x) > 0$. Then the function $\frac{1}{\rho_A + \rho_B}$ is continuous. The desired result follows from this.
