Prob. 14, Sec. 5.4, in Bartle & Sherbert's INTRO TO REAL ANALYSIS: Every continuous periodic function is bounded and uniformly continuous

Here is Prob. 14, Sec. 5.4, in the book Introduction To Real Analysis by Robert G. Bartle & Donald R. Sherbert, 4th edition:

A function $f \colon \mathbb{R} \to \mathbb{R}$ is said to be periodic on $\mathbb{R}$ if there exists a real number $p > 0$ such that $f(x+p) = f(x)$ for all $x \in \mathbb{R}$. Prove that a continuous periodic function on $\mathbb{R}$ is bounded and uniformly continuous on $\mathbb{R}$.

Here is another Mathematics Stack Exchange post on this very problem.

In this post, the boundedness part is clear. Here is my presentation thereof.

As $f$ is continuous on the closed bounded interval $[0, p]$, so $f$ is bounded on this interval, by virtue of Theorem 5.3.2 in Bartle & Sherbert. So there exists a real number $M > 0$ such that $$\lvert f(x) \rvert < M \qquad \mbox{ for all } x \in [0, p].$$

Now if $x$ is any real number, then since $p > 0$, we can find a natural number $n$ such that $np > x$; let $N$ be the smallest such natural number. Then $$Np > x \geq (N-1)p.$$ So $$p > x - (N-1)p \geq 0,$$ and therefore $$\big\lvert f \big( x-(N-1)p \big) \big\rvert < M.$$ As $f$ is periodic with period $p$, so we must have $$f(x) = f \big( x-(N-1)p \big),$$ which implies that $$\lvert f(x) \rvert = \big\lvert f \big( x-(N-1)p \big) \big\rvert < M.$$

Hence $$\lvert f(x) \rvert < M \qquad \mbox{ for all } x \in \mathbb{R}.$$ So $f$ is bounded on $\mathbb{R}$.

Is this proof correct and any clearer?

Now for the uniform continuity of $f$!!

Let us take any real number $\varepsilon > 0$.

As $f$ is continuous on the closed bounded interval $[0, 2p]$, so $f$ is uniformly continuous on this interval, by Theorem 5.4.3 in Bartle & Sherbert. So there exists a real number $\delta > 0$ (and this $\delta$ depends only on our $\varepsilon$) such that $$\lvert f(x) - f(u) \rvert < \varepsilon$$ for any points $x, u \in [0, 2p]$ such that $$\lvert x-u \rvert < \delta.$$ Let us choose our $\delta$ such that $\delta < p$.

Now let $x, y \in \mathbb{R}$ such that $\lvert x - y \rvert< \delta$.

As $2p > 0$, so we can find natural numbers $m$ and $n$ such that $2pm > x$ and $2pn > y$; let $M$ and $N$ be the smallest such natural numbers. Then we must have $$2pM > x \geq 2p(M-1) \qquad \mbox{ and } \qquad 2pN > y \geq 2p(N-1),$$ and so $$2p > x - 2p(M-1) \geq 0 \qquad \mbox{ and } \qquad 2p > y - 2p(N-1) \geq 0.$$ Since $f$ is periodic with period $p$, we also have $$f(x) = f\big( x - 2p(M-1) \big) \qquad \mbox{ and } \qquad f(y) = f\big( y - 2p(N-1) \big).$$

Now if we could show that the $M$ and the $N$ postulated above must be equal, then we must have $$\left\lvert \big( x-2p(M-1) \big) - \big( y-2p(N-1) \big) \right\rvert = \lvert x-y \rvert < \delta,$$ and also both $x-2p(M-1)$ and $y-2p(N-1)$ are in the interval $[0, 2p]$ (in fact the interval $[0, 2p)$). Therefore we obtain $$\lvert f(x) - f(y) \rvert = \left\lvert f\big( x-2p(M-1) \big) - f \big( y-2p(N-1) \big) \right\rvert < \varepsilon,$$ from which it follows that $f$ is uniformly continuous on $\mathbb{R}$.

But how to show that the $M$ and the $N$ must be equal? Or, is this the way pointed out in one of the answers to the question here?

The proof of boundedness on $${\mathbb R}$$ seems correct but can be made considerably shorter. As a general guideline, I recommend preferring prose to notation as much as possible.
Having proved that $$f(x)$$ is bounded in modulus by $$M$$ on the interval $$[0, p]$$, consider, as a first case, a point $$a > p$$ in $${\mathbb R}$$. Since $${\mathbb R}$$ is an Archimedean field, there exists the largest integer $$N$$ such that $$Np < a < (N+1)p$$. It follows that $$Np - a \in [0, p],$$ so $$f(a) = f(a - Np)$$. Therefore, $$|f(a)| \leq M$$. The proof for the case $$a < 0$$ is analogous.
As for uniform continuity, given an $$\epsilon > 0$$, the same $$\delta_{\epsilon} > 0$$ will satisfy the condition $$|x_{1} - x_{2}| < \delta_{\epsilon} \quad \mbox{ implies } \quad |f(x_{1}) - f(x_{2})| < \epsilon$$ on every subinterval $$[N p, (N+1) p]$$ of $${\mathbb R}$$ (where $$N$$ ranges over the integers). And if the points $$x_{1}, x_{2}$$ have between them an integral multiple $$K p$$ of $$p$$, then $$|x_{1} - K p| \leq |x_{1} - x_{2}| < \delta_{\epsilon} \mbox{ and } |x_{2} - K p| \leq |x_{1} - x_{2}| < \delta_{\epsilon},$$ so $$|x_{1} - x_{2}| \leq |x_{1} - K p| + |x_{2} - K p| < 2\delta_{\epsilon}. \quad \mbox{(the first inequality is the triangle inequality.)}$$ Therefore, the condition $$|x_{1} - x_{2}| < 2 \delta_{\epsilon} \quad \mbox{ implies } \quad |f(x_{1}) - f(x_{2})| < 2 \epsilon$$ holds on the union of the subintervals $$[N p, (N+1) p]$$; i.e., on $${\mathbb R}$$.