Proof of Lusin's Theorem $\mathbf{Theorem}$. Let $A \subset \mathbb{R}$ be a measurable set, $\mu(A)<\infty$ and $f$ a measurable function with domain $A$. Then, for every $\varepsilon >0$ there exists a compact set $K \subset A$ with $\mu(A \smallsetminus K) <\varepsilon$, such that the restriction of $f$ to $K$ is continuous.
Proof.  Let $\{V_n\}_{n\in\mathbb N}$ be an enumeration of the open intervals with rational endpoints. Fix compact sets $K_n\subset f^{-1}[V_n]$ and $K'_n\subset A \smallsetminus f^{-1}[V_n]$ for each $n$, so that 
$\mu\big(A \smallsetminus (K_n \cup K'_n)\big) < \varepsilon/2^n$.
Set $$K = \bigcap_{n=1}^{\infty} \big(K_n \cup K'_n\big). $$ 
Clearly $\mu(A \smallsetminus K) < \varepsilon$. 
Given $x \in K$ and $n$, such that $f(x) \in V_n$, we can prove continuity of $f$ when restricted on $K$, by choosing a compact neighbourhood $\tilde{K}_n$, such that $x \in \tilde{K}_n$ and $f(\tilde{K}_n \cap K) \subset V_n$.  $\qquad\qquad\square$
$\mathbf{Q1}$: I don't see how $K = \bigcap_{n=1}^{\infty}(K_n \cup K'_n) $ yields $\mu(A \setminus K) < \epsilon$. The way I see it, the intersection should have a really small measure. 
\begin{align}
K = \bigcap_{n=1}^{\infty}(K_n \cup K'_n) =\Bigg( \bigcup_{n=1}^{\infty} (K_n \cup K'_n)^{c} \Bigg)^{c}\\
\mu(K) = \mu \Bigg (\Bigg( \bigcup_{n=1}^{\infty} (K_n \cup K'_n)^{c} \Bigg)^{c} \Bigg) = \mu(A) - \mu \Bigg( \bigcup_{n=1}^{\infty} (K_n \cup K'_n)^{c} \Bigg)
\end{align}
the union of $(K_n \cup K'_n)^{c}$ is probably going to cover almost the entire $A$, right? If this is the case then $\mu(K)=\mu(A)-(\mu(A)-\delta) = \delta$. Where $\delta$ is a small number. Did I make a mistake somewhere?
$\mathbf{Q2}$: Do I understand it correctly that we're removing all the compacts $K'_n \subseteq A \setminus f^{-1}(V_n)$ from $A$ in order to achieve continuity? Because for $x \in K'_n$ we don't have $f(x) \in V_n$.
 A: It may be useful to note that the construction employed here has striking similarities with the construction of a fat Cantor set.
Regarding your first question: I assume that by complements you mean complements
w.r.t. $A$. The sets $K_n, K'_n$ are explicitly chosen so that
$$
  \mu \Bigg( \bigcup_{n=1}^{\infty} (K_n \cup K'_n)^{c} \Bigg) \le
  \sum_{n=1}^\infty \mu((K_n \cup K'_n)^c) <
  \sum_{n=1}^\infty \frac{\epsilon}{2^n} = \epsilon
$$
so the complements don't really cover much of $A$ if $\epsilon$ is small.
For the second question: I think the reason given for continuity is rather cryptic and confusing, so I found a different way of seeing it. The sets $V_n$ form a base of the topology of $\mathbb R$, so to prove continuity, it is enough to show that the (restricted) inverse image of each $V_n$ is open in $K$. It is an easy exercise in set theory to prove that
$$
  K \cap f^{-1}(V_n) = K \cap K_n = K \setminus K'_n
$$
and $K'_n$, as a compact subset of $\mathbb R$, is closed, so its complement is open.
To get a better perspective of how continuity is achieved, consider that for every $n$ we have 


*

*$K_n \cap K'_n = \emptyset$

*$K \subset K_n \cup K'_n$ 

*$K_n$ and $K'_n$ are both closed.


It follows that whenever $K \cap K_n$ and $K \cap K'_n$ are nonempty, they form a separation of $K$.  This suggests that $K$ tends to have very little connectivity and indeed if $f$ is injective, $K$ will be totally disconnected.
