I'm having trouble in the following statement given in Measure Theory by Donald Cohn and would appreciate help.
We consider a compact set, $K$ of $\mathbf{R}^d$ of the form $K = \prod_{i=1}^{d}[a_i,b_i]$. Suppose that $K$ is covered by the union of a sequence of open sets $R_k = \prod_{i=1}^d(c_{k,i},d_{k,i})$, so that $K\subseteq \cup_{k=1}^{\infty}R_k$. Due to compactness of $K$ we need only finitely many $R_k's$ to cover $K$ and may assume that all intersect $K$. So $K\subseteq \cup_{k=1}^{N}R_k$, where $1\leq k \leq N\Rightarrow R_k\cap K\neq \emptyset$.
Now the claim of my textbook is the following: $K$ can be decomposed into a finite collection $\{K_j\}_{j=1}^{M}$ of compact d-dimensional intervals (''cubes'') that overlap only on their boundary and are such that for each $j$ the interior of $K_j$ is included in some $R_i$.
I do not quite see how the collection $\{K_j\}$ may be constructed using induction. The base case is trivial for we take $K$ directly, but how should the induction step be performed?
I was thinking along the lines illustrated in the picture. 
Say a covering of $N$ open cubes can be decomposed as we want, and that $K\subseteq \cup_{k=1}^{N+1}R_k$ then we remove a closed cube $\tilde{K}$ contained in $R_{n+1}$ such that $\cup_{k=1}^{N}R_k$ cover $\overline{K\setminus\tilde{K}}$. This is done by letting $\tilde{K}$ have borders which are arbitrarily close to $R_{n+1}$. How could one formalize this statement?
In that case we have at most four new compact cubes which are covered by at most $N$ open cubes each and we may apply the induction hypothesis.
I'm wondering how one could formalize the induction argument and also whether this proof is correct in that case?
If I consider all hyperplanes couldn't I get a contradiction as in the image below where the deep blue rectangle is not contained in any open set:
Take all hyperplanes occurring in the boundaries of $K$ and the $R_k$. These hyperplanes partition $K$ into finitely many boxes $K_i$ with nonempty interior, all of them belonging to at least one $\overline{R_k}$. But if $K_i\subset \overline{R_k}$ then the interior of $K_i$ is contained in $R_k$.