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.