Let $(M^n, g)$ be a complete noncompact Riemannian manifold, and let $f: M \to \mathbb{R}$ be a smooth real function on $M$. Suppose there exist constants $r_0, c_1, c_2 > 0$ and a point $p_0 \in M$ (with such constants depending only on $n$ and the geometry of $M$, i.e. $g$ in the unit ball centered at $p_0$) such that $f$ satisfies
$$\frac{1}{4}(r(x) - c_1)^2 \leq f(x) \leq \frac{1}{4}(r(x) + c_2)^2,$$
whenever $r(x) \geq r_0$, where $r(x) = \operatorname{dist}(p_0, x)$ denotes the Riemannian distance to the point $p_0$. Then, defining for each $K > 0$ the set:
$$D_K = \{ x \in M \ \vert \ f(x) \leq K\},$$
I want to prove that $D_K$ is compact for all $K > 0$. I think I've already got it figured out, but I just wanna do a sanity check, so please correct me if I'm wrong:
Since $M$ is complete, by Hopf-Rinow we only need to prove that $D_K$ is closed and bounded in $M$. It is evidently closed since limits in metric spaces preserve inequalities (alternatively, because $D_K$ is the inverse image of a closed set by a continuous function). Now, if it were unbounded, then $D_K$ would escape any ball centered at $p_0$, and in particular, there would exist a sequence of points of $D_K$, say $\{x_n\}_{n \in \mathbb{N}} \subset D_K$, such that $\displaystyle{\lim_{n \in \mathbb{N}} r(x_n) = \infty} $. This is evidently absurd, since that would imply there would exist $n_0 \in \mathbb{N}$ such that $r(x_n) \geq r_0$ whenever $n \geq n_0$, and in particular we would have $\displaystyle{\lim_{n \in \mathbb{N}} f(x_n) = \infty}$, which would contradict the hypothesis that the sequence is contained in $D_K$.
Did I make any mistakes anywhere? Do you think the proof could be improved? I appreciate any help/suggestions. Thanks in advance!