Let $g(x)=f(x)+x$, where $f(x)$ is the Cantor function from $[0,1]$ to $[0,1]$. prove that $B$ is Lebesgue measurable but not Borel measurable. Let $g(x)=f(x)+x$, where $f(x)$ is the Cantor function from $[0,1]$ to $[0,1]$. We know for the Cantor set $C$, $g(C)$ contains a nonmeasurable set A. Let $B=g^{-1}(A)$, prove that $B$ is Lebesgue measurable but not Borel measurable.
I can show the first one since $B$ is the subset of a null set, which means $B$ is measurable. What about the second one?
 A: tl;dr
Suppose $B$ is Borel.
Let $h=g^{-1}$. Since $g(\mathcal{C})$ has measure 1, then there must exist a nonmeasurable $A\subseteq g(\mathcal{C})$.
However, since $h$ es measurable then $h^{-1}(B) = g(B) = A$ would be measurable, which is a contradiction. Therefore $B$ is not Borel.
Full answer
Below I give (what I think is) the complete construction of a measurable, non-Borel set. I first prove two lemmas and, using those, prove that $B$ is Lebesgue measurable (what you already did), but is not Borel.

Let $f$ be the Cantor function that maps $[0,1]$ to $[0,1]$, and let $g(x) = f(x) + x$.
Lemma 1. $g : [0,1]\rightarrow[0,2]$ is a homeomorphism, i.e. $g$ is a continuous bijection with a continuous inverse.
Proof. $g$ is injective and continuous because it is increasing and $f$ is continuous, so $g$ is the sum of continuous functions. Given that $g$ is continuous, $g(0)=0$ and $g(1)=2$, the Intermediate Value Theorem gives us that $g$ is surjective.
Let $h=g^{-1}$. Suppose $U\subseteq [0,1]$ is open.
Then $[0,1]\backslash U$ is closed and bounded, hence compact.
Since $g$ is continuous, $g([0,1]\backslash U)$ is compact.
Now,
$$
 g([0,1]\backslash U) = h^{-1}([0,1]\backslash U) = [0,2]\backslash h^{-1}(U),
$$
so $[0,2]\backslash h^{-1}(U)$ is closed and bounded, hence also compact.
Then $h^{-1}(U) \subseteq [0,2]$ is open and so $h$ is continuous, so $g$ is a homeomorphism.
Lemma 2. $g(\mathcal{C})$ has measure 1.
Proof. We know $f$ is constant on any interval in $[0,1]\backslash\mathcal{C}$. Thus for any interval $(a,b)\subseteq [0,1]\backslash\mathcal{C}$ we have that
$$
 \lambda(g(a),g(b)) = g(b)-g(a) = f(b) + b - f(a) - a = b-a.
$$
Let $\{I_{n,k}\}_{k=1}^{2^{n-1}}$ denote the collection of intervals removed at stage $n$ in the construction of $\mathcal{C}$. Then
\begin{align*}
 \lambda([0,2]\backslash\mathcal{C}) &= \lambda(g([0,1]\backslash\mathcal{C})) \\
  &= \lambda \left( g \left( \bigcup_{n=1}^\infty \bigcup_{k=1}^{2^{n-1}} I_{n,k} \right) \right) = \lambda \left(  \bigcup_{n=1}^\infty \bigcup_{k=1}^{2^{n-1}} g(I_{n,k}) \right) \\
  &= \sum_{n=1}^{\infty} \sum_{k=1}^{2^{n-1}} \lambda(g(I_{n,k})) = \sum_{n=1}^{\infty} \sum_{k=1}^{2^{n-1}} \lambda(I_{n,k}) \\
  &= 1,
\end{align*}
since the total measure of intervals removed is 1.
Since $[0,2] = g(\mathcal{C}) \uplus ([0,2]\backslash g(\mathcal{C}))$ (i.e. the disjoint union), then
$$
 2 = \lambda[0,2] = \lambda(g(\mathcal{C})) + \lambda([0,2]\backslash g(\mathcal{C})) = \lambda(g(\mathcal{C}))+1,
$$
hence $\lambda(g(\mathcal{C})) = 1$.

Since $\lambda(g(\mathcal{C}))>0$, there exists a nonmeasurable $A\subseteq g(\mathcal{C})$.
Let $B=g^{-1}(A)$.
Since $B\subseteq\mathcal{C}$, then $\lambda^*(B)\leq \lambda^*(\mathcal{C})=0$.
Thus $B$ has outer measure zero and hence it is measurable, but $g(B)=A$ is nonmeasurable.
We claim $B$ is not Borel.
Suppose for contradiction it was. Since $h$ es measurable, then $h^{-1}(B) = g(B) = A$ would be measurable, which is a contradiction. Therefore $B$ is not Borel.
A: In a general setting, if we are given a continuous $g:X\to Y,$ then $g^{-1}(E)$ is Borel in $X$ for every Borel $E\subset Y.$ It follows that if $g$ is a homeomorphism of $X$ onto $Y,$ then $E$ Borel in $X$ implies $g(E)$ is Borel in $Y.$
In your problem, verify that $g$ is a homeomorphism of $[0,1]$ onto $[0,2].$ If $B$ were Borel, then $g(B) = A$ would be Borel. That's a contradiction, since $A$ is not even Lebesgue measurable.  
