For $1 \leqslant i \leqslant n$, let $B_i = B_{r_i}(x_i) = \{x \in \mathbb{R}^d \colon \lVert x - x_i\rVert < r_i\}$.
Let $K_1 = K \setminus \bigcup\limits_{j = 2}^n B_j$. The balls $B_j$ are open, hence $K_1$ is a closed subset of $K$, therefore $K_1$ is compact. Let $s_1 := \sup \{\lVert x - x_1\rVert \colon x \in K_1\}$. Since $K_1$ is compact (and the norm/distance continuous), $K_1 = \varnothing$ or there exists a point $y_1 \in K_1$ with $\lVert y_1 - x_1\rVert = s_1$. Then $y_1 \in K$, and $y_1 \notin \bigcup\limits_{j = 2}^n B_j$, hence $y_1 \in B_1$, thus $s_1 < r_1$. Choose $0 < t_1 \in (s_1,\, r_1)$, and let $\tilde{B}_1 = B_{t_1}(x_1)$.
By definition of $s_1$ and the choice of $t_1$, $K_1 \subset \tilde{B}_1$ and therefore
$$K \subset \tilde{B}_1 \cup \bigcup_{j = 2}^n B_j.$$
Now let $K_2 = K \setminus \left(\tilde{B}_1 \cup \bigcup_{j = 3}^n B_j\right)$. With the same argument as above, we find a $0 < t_2 < r_2$ such that, setting $\tilde{B}_2 = B_{t_2}(x_2)$, we have $K \subset\bigcup\limits_{k = 1}^2 \tilde{B}_k \cup \bigcup\limits_{j=3}^n B_j$.
It should be clear how to continue, and after $n$ steps, we have $n$ $0 < t_j < r_j$ such that
$$K \subset \bigcup_{k=1}^n \tilde{B}_k = \bigcup_{k=1}^n B_{t_k}(x_k) \subset \bigcup_{k=1}^n \overline{B_{t_k}(x_k)} \subset \bigcup_{j=1}^n B_j.$$
Such a shrinking of covers is possible in far more general situations than a finite cover of a compact set.