Part of proof to show Lebesgue-lebesgue measurable I want to prove the following:

Suppose $E$ is a subset of $\Bbb R$, let $\gamma(E)=\{ (x,y)\in \Bbb R \times \Bbb R :x-y\in E\}$. If $E\in \Bbb B$ (Borel/Lebesgue measurable set), show that $\gamma(E)\in \Bbb B \times \Bbb B$ .

Here’s my idea: 
I want to first prove the following: Let $(X,\Bbb X)$ be a measurable space, $f$ be a measurable function on $X$ to $\Bbb R$, and let $\phi$ be a Borel measurable function, want to show that $\phi \circ f$ is measurable. 
Then I will take $\phi=\chi_E$ and $f(x,y)=x-y$ to come up with the result.
But I’m not sure how to prove $\phi \circ f$ is $X$-measurable. Could someone help to provide a proof please? I’m also not sure if I’m on the right track. Thanks.
 A: The function: $f:\mathbb{R}^2\to\mathbb{R}$ is Borel-measurable (it is continuous), so if $E$ is Borel, then $\gamma(E)=f^{-1}(E)$ is Borel.
For the Lebesgue-measurable part, let $\lambda$ be the Lebesgue measure. Let's first show that if $A$ is Borel in $\mathbb{R}$ and $\lambda(A)=0$, then $\lambda^2(f^{-1}(A))=0$ (where $\lambda^2$ is the Lebesgue measure on $\mathbb{R}^2$).
Consider the linear function $T:\mathbb{R}^2\to\mathbb{R}^2$, $T(x,y)=(x-y,y)$ (this transforms $f^{-1}(A)$ in a rectangle). Then
$$\mu(f^{-1}(A))=\int_{\mathbb{R}^2}\chi_A(x)dx$$
Making the substitution $x=T^{-1}y$, we have
$$\mu(f^{-1}(A))=\int_{\mathbb{R}^2}\chi_A(T^{-1}y)|\det T^{-1}|dyx=\int_{\mathbb{R}^2}\chi_{T(A)}(y)dy=\lambda^2(T(A))=\lambda^2(A\times\mathbb{R})=0$$
It follows that if $N$ is null in $\mathbb{R}$ (i.e., $N\subseteq A$, where $A$ is Borel and $\lambda(A)=0$), then $f^{-1}(N)$ is null in $\mathbb{R}^2$, and in particular it is Lebesgue measurable.
Since every Lebesgue set in $\mathbb{R}$ is the union of a Borel set and a null set, we are done.
A: Another proof of: Let $f(x,y) = x-y.$ If $E\subset \mathbb R$ is a Borel set with $\lambda_1(E)=0,$ then $f^{-1}(E)$ is a Borel subset of $\mathbb R^2$ with $\lambda_2(f^{-1}(E))=0.$
Proof: I take as known that the continuity of $f$ implies $f^{-1}(E)$ is a Borel set. So we can apply Fubini:
$$\tag 1 \lambda_2(f^{-1}(E)) = \int_{\mathbb R^2} \chi_{f^{-1}(E)}\, d \lambda_2 = \int_{\mathbb R}\int_{\mathbb R}\chi_{f^{-1}(E)}(x,y)\, dx\, dy.$$
If we fix $y,$ then the inner integrand as a function of $x$ is simply $\chi_{E+y}.$ The $x$ integral is then $\lambda_1(E+y) = \lambda_1(E) = 0.$ Thus $(1)$ equals $\int_{\mathbb R} 0\, dy = 0$ as desired.
