Let $L \to M \to N \to L[1]$ be a distinguished triangle in $D^b_{\textit{Coh}}(\mathcal{O}_X)$. Then we obtain a commutative diagram $$ \xymatrix{ \ldots \ar[r] & \colim \Hom_X(K_n, L) \ar[r] \ar[d] & \colim \Hom_X(K_n, M) \ar[r] \ar[d] & \colim \Hom_X(K_n, N) \ar[r] \ar[d] & \ldots \\ \ldots \ar[r] & \Hom_U(K, L|_U) \ar[r] & \Hom_U(K, M|_U) \ar[r] & \Hom_U(K, N|_U) \ar[r] & \ldots } $$ whose rows are exact by Derived Categories, Lemma \ref{derived-lemma-representable-homological} and Algebra, Lemma \ref{algebra-lemma-directed-colimit-exact}. Hence if the statement of the lemma holds for $N[-1]$, $L$, $N$, and $L[1]$ then it holds for $M$ by the 5-lemma. Thus, using the distinguished triangles for the canonical truncations of $L$ (see Derived Categories, Remark \ref{derived-remark-truncation-distinguished-triangle}) we reduce to the case that $L$ has only one nonzero cohomology sheaf. \medskip\noindent Choose a bounded complex $\mathcal{F}^\bullet$ of coherent $\mathcal{O}_X$-modules and a quasi-coherent ideal $\mathcal{I} \subset \mathcal{O}_X$ cutting out $X \setminus U$ such that $K_n$ is represented by $\mathcal{I}^n\mathcal{F}^\bullet$. Using ``stupid'' truncations we obtain compatible termwise split short exact sequences of complexes $$ 0 \to \sigma_{\geq a + 1} \mathcal{I}^n\mathcal{F}^\bullet \to \mathcal{I}^n\mathcal{F}^\bullet \to \sigma_{\leq a} \mathcal{I}^n\mathcal{F}^\bullet \to 0 $$ which in turn correspond to compatible systems of distinguished triangles in $D^b_{\textit{Coh}}(\mathcal{O}_X)$. Arguing as above we reduce to the case where $\mathcal{F}^\bullet$ has only one nonzero term. This reduces us to the case discussed in the next paragraph. \medskip\noindent Given a coherent $\mathcal{O}_X$-module $\mathcal{F}$ and a coherent $\mathcal{O}_X$-module $\mathcal{G}$ we have to show that the canonical map $$ \colim \Ext^i_X(\mathcal{I}^n\mathcal{F}, \mathcal{G}) \longrightarrow \Ext^i_U(\mathcal{F}|_U, \mathcal{G}|_U) $$ is an isomorphism for all $i \geq 0$. For $i = 0$ this is Cohomology of Schemes, Lemma \ref{coherent-lemma-homs-over-open}. Assume $i > 0$. \medskip\noindent Injectivity. Let $\xi \in \Ext^i_X(\mathcal{I}^n\mathcal{F}, \mathcal{G})$ be an element whose restriction to $U$ is zero. We have to show there exists an $m \geq n$ such that the restriction of $\xi$ to $\mathcal{I}^m\mathcal{F} = \mathcal{I}^{m - n}\mathcal{I}^n\mathcal{F}$ is zero. After replacing $\mathcal{F}$ by $\mathcal{I}^n\mathcal{F}$ we may assume $n = 0$, i.e., we have $\xi \in \Ext^i_X(\mathcal{F}, \mathcal{G})$ whose restriction to $U$ is zero. By Derived Categories of Schemes, Proposition \ref{perfect-proposition-DCoh} we have $D^b_{\textit{Coh}}(\mathcal{O}_X) = D^b(\textit{Coh}(\mathcal{O}_X))$. Hence we can compute the $\Ext$ group in the abelian category of coherent $\mathcal{O}_X$-modules. This implies there exists an surjection $\alpha : \mathcal{F}'' \to \mathcal{F}$ such that $\xi \circ \alpha = 0$ (this is where we use that $i > 0$). Set $\mathcal{F}' = \Ker(\alpha)$ so that we have a short exact sequence $$ 0 \to \mathcal{F}' \to \mathcal{F}'' \to \mathcal{F} \to 0 $$ It follows that $\xi$ is the image of an element $\xi' \in \Ext^{i - 1}_X(\mathcal{F}', \mathcal{G})$ whose restriction to $U$ is in the image of $\Ext^{i - 1}_U(\mathcal{F}''|_U, \mathcal{G}|_U) \to \Ext^{i - 1}_U(\mathcal{F}'|_U, \mathcal{G}|_U)$. By Artin-Rees the inverse systems $(\mathcal{I}^n\mathcal{F}')$ and $(\mathcal{I}^n \mathcal{F}'' \cap \mathcal{F}')$ are pro-isomorphic, see Cohomology of Schemes, Lemma \ref{coherent-lemma-Artin-Rees}. Since we have the compatible system of short exact sequences $$ 0 \to \mathcal{F}' \cap \mathcal{I}^n\mathcal{F}'' \to \mathcal{I}^n\mathcal{F}'' \to \mathcal{I}^n\mathcal{F} \to 0 $$ we obtain a commutativew diagram $$ \xymatrix{ \colim \Ext^{i - 1}_X(\mathcal{I}^n\mathcal{F}'', \mathcal{G}) \ar[r] \ar[d] & \colim \Ext^{i - 1}_X(\mathcal{F}' \cap \mathcal{I}^n\mathcal{F}'', \mathcal{G}) \ar[r] \ar[d] & \colim \Ext^i_X(\mathcal{I}^n\mathcal{F}, \mathcal{G}) \ar[d] \\ \Ext^{i - 1}_U(\mathcal{F}''|_U, \mathcal{G}|_U) \ar[r] & \Ext^{i - 1}_U(\mathcal{F}'|_U, \mathcal{G}|_U) \ar[r] & \Ext^{i - 1}_U(\mathcal{F}|_U, \mathcal{G}|_U) } $$ with exact rows. By induction on $i$ and the comment on inverse systems above we find that the left two vertical arrows are isomorphisms. Now $\xi$ gives an element in the top right group which is the image of $\xi'$ in the middle top group, which in turn maps to an element of the bottom middle group coming from some element in the left bottom group. We conclude that $\xi$ maps to zero in $\Ext^i_X(\mathcal{I}^n\mathcal{F}, \mathcal{G})$ for some $n$ as desired. \medskip\noindent Surjectivity. Let $\xi \in \Ext^i_U(\mathcal{F}|_U, \mathcal{G}|_U)$. Arguing as above using that $i > 0$ we can find an surjection $\mathcal{H} \to \mathcal{F}|_U$ of coherent $\mathcal{O}_U$-modules such that $\xi$ maps to zero in $\Ext^i_U(\mathcal{H}, \mathcal{G}|_U)$. Then we can find a map $\varphi : \mathcal{F}'' \to \mathcal{F}$ of coherent $\mathcal{O}_X$-modules whose restriction to $U$ is $\mathcal{H} \to \mathcal{F}|_U$, see Properties, Lemma \ref{properties-lemma-extend-finite-presentation}. Observe that the lemma doesn't guarantee $\varphi$ is surjective but this won't matter (it is possible to pick a surjective $\varphi$ with a little bit of additional work). Denote $\mathcal{F}' = \Ker(\varphi)$. The short exact sequence $$ 0 \to \mathcal{F}'|_U \to \mathcal{F}''|_U \to \mathcal{F}|_U \to 0 $$ shows that $\xi$ is the image of $\xi'$ in $\Ext^{i - 1}_U(\mathcal{F}'|_U, \mathcal{G}|_U)$. By induction on $i$ we can find an $n$ such that $\xi'$ is the image of some $\xi'_n$ in $\Ext^{i - 1}_X(\mathcal{I}^n\mathcal{F}', \mathcal{G})$. By Artin-Rees we can find an $m \geq n$ such that $\mathcal{F}' \cap \mathcal{I}^m\mathcal{F}'' \subset \mathcal{I}^n\mathcal{F}'$. Using the short exact sequence $$ 0 \to \mathcal{F}' \cap \mathcal{I}^m\mathcal{F}'' \to \mathcal{I}^m\mathcal{F}'' \to \mathcal{I}^m\Im(\varphi) \to 0 $$ the image of $\xi'_n$ in $\Ext^{i - 1}_X(\mathcal{F}' \cap \mathcal{I}^m\mathcal{F}'', \mathcal{G})$ maps by the boundary map to an element $\xi_m$ of $\Ext^i_X(\mathcal{I}^m\Im(\varphi), \mathcal{G})$ which maps to $\xi$. Since $\Im(\varphi)$ and $\mathcal{F}$ agree over $U$ we see that $\mathcal{F}/\mathcal{I}^m\Im(\varphi)$ is supported on $X \setminus U$. Hence there exists an $l \geq m$ such that $\mathcal{I}^l\mathcal{F} \subset \mathcal{I}^m\Im(\varphi)$, see Cohomology of Schemes, Lemma \ref{coherent-lemma-power-ideal-kills-sheaf}. Taking the image of $\xi_m$ in $\Ext^i_X(\mathcal{I}^l\mathcal{F}, \mathcal{G})$ we win.