Let $\lambda=l^{*}$ the Lebesgue measure in $\Bbb{R}$, and $A$ a Lebesgue-measurable subset of $\Bbb{R}$ with $\lambda(A)<\infty.$
If $\epsilon>0,$ I need to prove that exists an open set $G$ which is the union of a finite number of open intervals such that $$||\chi_{A}-\chi_{G} ||_{1}=|\lambda(A)-\lambda(G)|<\epsilon. $$ Moreover, exists a continuous function $f$ such that $$||\chi_{A}-f ||_{1}=\int|\chi_{A}-f|d\lambda <\epsilon. $$
The exercise asks to use the following exercises, that I already did it:

What I did:
By exercise 9.G, exists an open set $G_{\epsilon}$ such that $A\subset G_{\epsilon}$ and $$\lambda(A)\leq \lambda(G_{\epsilon})\leq\lambda(A)+\epsilon $$
By exercise 9.H, exists a compact set $K_{\epsilon}\subset A$ such that $$\lambda(K_{\epsilon})\leq \lambda(A)\leq \lambda(K_{\epsilon})+\epsilon.$$
Now, I will use the compactness of $K_{\epsilon}.$ If $(A_{i})_{i\in I}$ is an open cover of $K_{\epsilon}$ such that every $A_{i}$ is an open interval, with $A_{i}\subset G_{\epsilon}$, we can extract a finite subcover $(A_{i})_{i\in\Bbb{N}}$ of $K_{\epsilon}$.
Define $G=\bigcup_{i=1}^{n}A_{i}.$ So, we have
$$\lambda(K_{\epsilon})\leq\lambda(G)\leq\lambda(A)\leq\lambda(K_{\epsilon})+\epsilon $$
I don't know what to do from here. My construction of $G$ is the set asked for the exercise? What can I do?
We denote $\triangle $ the symmetric difference $A \triangle B=(A \setminus B) \cup( B \setminus A)$
Since $A$ has a finite measure and is measurable, then $\forall \epsilon>0$, exist disjoint open intervals $J_1,...,J_m$ such that $m(A \triangle \bigcup_{k=1}^mJ_k)<\epsilon$
Thus $$\int |1_A-1_G| = \int|1_{A \triangle G}|=m(A \triangle G)<\epsilon$$
We have that $1_G=\sum_{k=1}^{m}J_k$
Now you can easily approximate $1_G$ by a continuous function which is piecewise affinic.