First are relevant definitions from textbook Analysis III by Amann.
Here $(X, \mathcal{A}, \mu)$ is a complete, $\sigma$-finite measure space and $(E,|\cdot|)$ a Banach space.
We say $f \in E^{X}$ is $\mu$-simple if $f(X)$ is finite, $f^{-1}(e) \in \mathcal{A}$ for every $e \in E,$ and $\mu\left(f^{-1}(E \backslash\{0\})\right)<\infty .$ We denote by $\mathcal{S}(X, \mu, E)$ the set of all $\mu$-simple functions.
A function $f \in E^{X}$ is said to be $\mu$-measurable if there is a sequence $\left(f_{j}\right)$ in $\mathcal{S}(X, \mu, E)$ such that $f_{j} \rightarrow f$ $\mu$-almost everywhere as $j \rightarrow \infty$.
A function $f \in E^{X}$ is said to be $\mathcal{A}$-measurable if the inverse images of open sets of $E$ under $f$ are measurable, that is, if $f^{-1}\left(\mathcal{T}_{E}\right) \subset \mathcal{A},$ where $\mathcal{T}_{E}$ is the norm topology on $E .$ If there is a $\mu$-null set $N$ such that $f\left(N^{c}\right)$ is separable, we say $f$ is $\mu$ -almost separable valued.
Then the authors present a theorems and its proof:
I understand why $O_n$ is open but stuck at $\overline{O_n} \subset O$. Could you please elaborate on this point?

$$O_n \subseteq \{y \in O: \operatorname{dist}(y, O^c) \ge \frac{1}{n}\}$$ (trivially as we replace $>$ by $\ge$) and the latter set is closed by continuity of $\text{dist}(\cdot,O^c)$, just as $O_n$ is open for the same reason.
So $$\overline{O_n} \subseteq \{y \in O: \operatorname{dist}(y, O^c) \ge \frac{1}{n}\}$$
and so $y \in \overline{O_n}$ implies $\operatorname{dist}(y, O^c) \ge \frac1n >0$ which implies $y \in O$ (otherwise $y \in O^c$ and $\operatorname{dist}(y, O^c)=0$ would hold). Hence $\overline{O_n} \subseteq O$.