Continuous function from Compact Metric Space to Metric Space is Uniformly Continuous

In Rudin 4.10 he wants us to show that a continuous function from a compact metric space to a metric space is uniformly continuous by deriving that if $f$ is not uniformly continuous then there is an $\epsilon >0$ such that there are two sequences $(p_n)$ and $(q_n)$ such that $d(p_n, q_n) \to 0$ and $d(f(p_n,f(q_n))>\epsilon$ and then, using the fact that every infinite subset of a compact metric space has a limit point in that space, get a contradiction.

Proof

$f$ not uniformly continuous on $X$ implies that $\exists \epsilon >0 : \forall \delta >0, x \in X: \exists x'\in X : d(x,x')<\delta$ but $d(f(x),f(x'))>\epsilon$

So let $p_{n}\rightarrow x$ and $q_{n}\rightarrow x'$

(Need to show existence?)

Since $\{p_n\}$ and $\{q_n\}$ are infinite subsets of $f(X)$, a compact set by continuity, both of them have their limits in $f(X)$ but that would mean $f$ is discontinuous at $x$, as two sequences are converging to different values at $x$.

Is this the contradiction that they're looking for? Thanks.

You are correct. To make it precise, first assume that $f$ is not uniformly continuous, then there is a fixed $\epsilon >0$ and $p_n, q_n$ such that
$$d(p_n, q_n) \leq 1/n \ \text{ and }d(f(p_n)), f(q_n) ) > \epsilon$$
By passing to subsequence if necessary, we can assume that $p_n \to x$ as $X$ is compact. As $d(p_n, q_n) \to 0$, we also have $q_n \to x$. By continuity of $f$,
$$\lim_{n\to \infty} f(p_n) = f(x) = \lim_{n\to \infty} f(p_n) .$$
But this is a impossible as $d(f(p_n), f(q_n)) > \epsilon$. Thus no such two sequences could be found and $f$ is uniformly continuous.