[step:Differentiability of $\tilde f$ at points of $K$ with $\nabla \tilde f|_K = d$]
Fix $x_* \in K$ and a compact neighbourhood $H \subseteq K$ of $x_*$ (e.g.\ $H := K \cap \overline{B(x_*, 1)}$).
*Case A: $x \in K$.* By definition $\tilde f(x) = f(x)$ and $\tilde f(x_*) = f(x_*)$, so
\begin{align*}
\tilde f(x) - \tilde f(x_*) - d(x_*) \cdot (x - x_*) = f(x) - f(x_*) - d(x_*) \cdot (x - x_*) = |x - x_*| R(x_*, x).
\end{align*}
By (W) applied with $a = x_*$, $b = x$, this is $o(|x - x_*|)$ as $x \to x_*$ in $K$.
*Case B: $x \in \mathbb{R}^n \setminus K$.* Choose a Whitney cube $Q_i$ with $x \in Q_i^*$ (so $i = i(x)$ is admissible as the reference index). By the bound $|x - x_i| \le C \ell(Q_i)$ from the previous step, and by (D2), $|x - x_i| \le C \ell(Q_i)$.
We compute
\begin{align*}
\tilde f(x) - P_i(x) = \sum_{j \in J(x)} \psi_j(x)(P_j(x) - P_i(x)),
\end{align*}
where $J(x) := \{j \in J : \psi_j(x) > 0\}$ has cardinality at most $N_n$ by (D3). By ($\star$) applied to each pair $(i, j)$, $|P_j(x) - P_i(x)| = o(\ell(Q_i))$, and since $0 \le \psi_j(x) \le 1$,
\begin{align*}
|\tilde f(x) - P_i(x)| \le \sum_{j \in J(x)} \psi_j(x)\,|P_j(x) - P_i(x)| \le N_n \cdot o(\ell(Q_i)) = o(\ell(Q_i)).
\end{align*}
We bound $\ell(Q_i)$ by $|x - x_*|$. Since $x \in Q_i^*$, the distance from $x$ to $K$ satisfies
\begin{align*}
\operatorname{dist}(x, K) \ge \operatorname{dist}(Q_i, K) - \operatorname{diam}(Q_i^*) \ge \sqrt{n} \, \ell(Q_i) - (9/8)\sqrt{n}\, \ell(Q_i) \cdot \tfrac{1}{2}
\end{align*}
— more carefully, since $Q_i^*$ is a $9/8$-enlargement of $Q_i$, any point of $Q_i^*$ is within $(1/16)\sqrt{n}\,\ell(Q_i)$ of $Q_i$, hence $\operatorname{dist}(x, K) \ge \operatorname{dist}(Q_i, K) - (1/16)\sqrt{n}\,\ell(Q_i) \ge \sqrt{n}\,\ell(Q_i) - (1/16)\sqrt{n}\,\ell(Q_i) = (15/16)\sqrt{n}\,\ell(Q_i)$. Thus $\operatorname{dist}(x, K) \ge c \, \ell(Q_i)$ with $c := (15/16)\sqrt{n}$, and since $x_* \in K$, $|x - x_*| \ge \operatorname{dist}(x, K) \ge c \, \ell(Q_i)$. Therefore $\ell(Q_i) \le |x - x_*|/c$, and
\begin{align*}
|\tilde f(x) - P_i(x)| = o(\ell(Q_i)) = o(|x - x_*|).
\end{align*}
For $x \to x_*$ with $x \notin K$, we also have $x_i \to x_*$, since $|x_i - x_*| \le |x_i - x| + |x - x_*| \le C \ell(Q_i) + |x - x_*| \le (C/c + 1) |x - x_*|$. In particular, $x_i \in H$ for $x$ sufficiently close to $x_*$.
Compute
\begin{align*}
P_i(x) - f(x_*) - d(x_*) \cdot (x - x_*) &= f(x_i) + d(x_i) \cdot (x - x_i) - f(x_*) - d(x_*) \cdot (x - x_*) \\
&= [f(x_i) - f(x_*) - d(x_*)\cdot(x_i - x_*)] + (d(x_i) - d(x_*))\cdot(x - x_i) \\
&= |x_i - x_*| R(x_*, x_i) + (d(x_i) - d(x_*))\cdot(x - x_i).
\end{align*}
By (W) with $a = x_*$, $b = x_i$, the first term is $|x_i - x_*| \cdot o(1)$, and $|x_i - x_*| \le (C/c + 1)|x - x_*|$, so this is $o(|x - x_*|)$. The second term is bounded by $|d(x_i) - d(x_*)| \cdot |x - x_i| \le |d(x_i) - d(x_*)| \cdot C \ell(Q_i) \le |d(x_i) - d(x_*)| \cdot (C/c) \cdot |x - x_*|$, which is $o(|x - x_*|)$ by continuity of $d$ at $x_*$ (hypothesis).
Combining Case B,
\begin{align*}
\tilde f(x) - \tilde f(x_*) - d(x_*) \cdot (x - x_*) = (\tilde f(x) - P_i(x)) + (P_i(x) - f(x_*) - d(x_*)\cdot(x - x_*)) = o(|x - x_*|).
\end{align*}
In both Cases A and B, $\tilde f(x) - \tilde f(x_*) - d(x_*) \cdot (x - x_*) = o(|x - x_*|)$ as $x \to x_*$. Hence $\tilde f$ is differentiable at $x_*$ with $\nabla \tilde f(x_*) = d(x_*)$.
[/step]