Lee Introduction to smooth manifolds problem 6-4 Need help with one of the problems in Lee's intro to smooth manifolds.
The problem is as follows: (6-4)
Let $M$ be a smooth manifold, and $B$ be a closed subset of $M$, and let $\delta:M\rightarrow\mathbb {R}$ be a positive function. Given any function $f:M\rightarrow \mathbb{R} ^k$, show that there is a continuous function $\tilde{f}:M\rightarrow \mathbb{R}^k$ that is smooth on $M\setminus B$ 
and agrees with $f$ on $B$ and is $\delta$ close to $f$.
I think I might have a solution by revising the proof to the Whitney's approximation theorems for functions(theorem 6.21), along with the help of this post Smooth extension of a continuous function on the boundary of a domain. However, Lee provides a hint to use problem 6.3, which says under the same assumptions, we can find a smooth function $\tilde{\delta}:M\rightarrow\mathbb{R}$ that is zero on $B$, positive on $M\setminus B$, and satisfies $\tilde{\delta}(x)<\delta(x)$ everywhere. My question is : how to use 6.3 to show 6.4? The crucial difficulty is that $f$ is not assumed to smooth on $B$ in 6.4.
Any help is immensely appreciated, this is not a homework question.
 A: By Problem 6-3, there is a smooth function $\tilde{\delta}:M\to\Bbb R$ such that $\tilde{\delta}|_B\equiv 0$ and $0<\tilde{\delta}(x)<\delta(x)$ on $M\setminus B$. Since $M\setminus B$ is an embedded submanifold of $M$, by smooth approximation theroem on $f|_{M\setminus B}$, there is a smooth map $\tilde{f}:M\setminus B\to\Bbb R^k$ which is $\tilde{\delta}$-close to $f$. Extend $\tilde{f}$ on $M$ by defining $\tilde{f}(x) =f(x)$ for $x\in B$. Once we show $\tilde{f}$ is continuous, by construction, $\tilde{f}$ is the desired function.
Claim: $\tilde{f}:M\to\Bbb R^k$ is continuous.
Continuity of $\tilde{f}$ on $M\setminus B$ is clear. Let $x\in B$ and $\{x_n\}$ be a sequence in $M$ converging to $x$. Since $\tilde{f}$ is $\tilde{\delta}$ close to $f$, $|\tilde{f}(x_n)-f(x_n)|\leq \tilde{\delta}(x_n)$ for all $n$. Since $\tilde{\delta}(x_n)$ is continuous, $\tilde{\delta}(x_n)\to\tilde{\delta}(x) = 0$ as $n\to\infty$ so $|\tilde{f}(x_n)-f(x_n)|\to 0$ as $n\to\infty$. Also, as $f$ is continuous, $|f(x)-f(x_n)|\to 0$ as $n\to\infty$. Hence, for given $\epsilon>0$, for large $N$, if $n\geq N$ then
\begin{align*}
|\tilde{f}(x_n)-\tilde{f}(x)| = |\tilde{f}(x_n)-f(x)|\leq |\tilde{f}(x_n)-f(x_n)|+|f(x_n)-f(x)|<\epsilon.
\end{align*}
Hence, $\tilde{f}$ is continuous which completes the proof.
