You have $$|\phi(x)-\phi(y)|= \frac{ |d(x,A)d(y,B)-d(y,A)d(x,B)|}{(d(x,A)+d(x,B))(d(y,A)+d(y,B))}$$
Eventually, permute $x$ and $y$ so that: $$|\phi(x)-\phi(y)|= \frac{ d(x,A)d(y,B)-d(y,A)d(x,B)}{(d(x,A)+d(x,B))(d(y,A)+d(y,B))}$$
But $d(x,A) \leq d(x,y)+d(y,A)$ so $$ \begin{array}{ll} d(x,A)d(y,B)-d(y,A)d(x,B) & \leq d(x,y)d(y,B)+d(y,A)(d(y,B)-d(x,B)) \\ & \leq d(x,y)(d(y,A)+d(y,B)) \end{array}$$
Finally, $$|\phi(x)-\phi(y)| \leq \frac{d(x,y)}{d(x,A)+d(x,B)}$$
To show that $\phi$ is locally lipschitz, it is sufficient to notice that $x \mapsto d(x,A)+d(x,B)$ is locally bounded below.
Because $\overline{A} \cap \overline{B}=\emptyset$, for any point $x$ there exists an open ball $B(r)$ such that either $B(r) \cap \overline{A}= \emptyset$ or $B(r) \cap \overline{B}= \emptyset$; without loss of generality, suppose $B(r) \cap \overline{A}= \emptyset$. Then $$d(x,A)+d(x,B) \geq d(x,A) \geq r$$
Remark: If $\delta:=d(A,B)>0$, then $\phi$ is $1/\delta$-lipschitz.