Suppose $U \subsetneq \mathbb{R}^d$ is open. How do I see that the distance function$$u(x) = \min_{y \in \mathbb{R}^d \setminus U} x  y$$is the unique nonnegative continuous function on $\mathbb{R}^d$ that satisfies$$\begin{cases} \lim_{r \to 0} {1\over r}((u(x)  \min_{\partial B(x, r)} u) = 1 & \text{if }x \in U \\ u(x) = 0 & \text{if }x \in \mathbb{R}^d \setminus U?\end{cases}$$
Give yourself "an epsilon of room" and apply the continuity method.
It suffices to check it for $x\in U$.
For one direction, let $\epsilon>0$ and $y\notin U$ such that $d:=d(x,\mathbb{R}^nU)=yx$. Let
$A=\{t\in[0,1]:\forall s\in[0,t],u(x+s(yx))\ge u(x)(1+\epsilon)sd\}$.
Then $A$ is both open and closed in $[0,1]$, and contains 0, so $A=[0,1]$, and $u(x)\le(1+\epsilon)d$. Take $\epsilon\to0$ and you get $u(x)\le d$.
For the other direction, let $\epsilon>0$ and
$B=\{r\in[0,u(x)]:\exists z\in U$ such that $u(z)\le u(x)r$ and $u(z)\le u(x)(1\epsilon)zx\}$.
If $u(x)<(1\epsilon)d$, then $B$ is both open and closed in $[0,u(x)]$ and contains 0, so $B=[0,u(x)]$, and there is $z\in U$ such that $u(z)=0$, which is a contradiction when you look at a neighborhood of $z$. Hence $u(x)\ge(1\epsilon)d$. Take $\epsilon\to0$ and you get $u(x)\ge d$.

$\begingroup$ Could you explain why A is open in your proof above ? Thanks. $\endgroup$ – Ayman Moussa Apr 26 '17 at 15:07

$\begingroup$ Sorry. Technically you only have $t\in A$ implies $(t,t+\delta)\subset A$. I changed the definition of $A$. $\endgroup$ – Fan Zheng Apr 26 '17 at 19:53

$\begingroup$ I apologize, I still don't understand how you avoid the scenario $u(x+t(yx)) = u(x)(1+\epsilon)t d$ ? After all, the only assumption you have on $u$ concerns the asymptotic $t\rightarrow 0$, isn't it ? $\endgroup$ – Ayman Moussa Apr 27 '17 at 15:59

$\begingroup$ You should use the assumption at the point $x+t(yx)$ and let $r=\delta$. $\endgroup$ – Fan Zheng May 1 '17 at 0:24