$\newcommand{\R}{\Bbb R}\newcommand{\Z}{\Bbb Z}\newcommand{\N}{\Bbb N}\newcommand{\Q}{\Bbb Q}$ I don't know how many tools you have available, but a solution can go like this.
If $F$ and $G$ are measurable functions defined in $\R^d$ then $FG$ is a measurable function. A proof of this fact can be found here.
Then it's enough to show that the maps $(x,y)\mapsto f(y-x),\qquad (x,y)\mapsto g(x)$ are measurable functions.
First, we need the following Lemma.
Lemma. Let $E\subseteq \R$ a measurable set. If $[a,b[$ is a finite interval, then $E\times [a,b[$ and $[a,b[\times E$ are measurables in $\R^{2}$.
Notice that it's enough to prove the Lemma for the interval $[0,1[$. Then the proof of the Lemma is in stages:
- First consider $E$ with $m(E)=0$
- Then consider $E=(c,d)$ a finite open interval.
- $E$ open set with finite measure.
- $E$ a $G_\delta$ set with finite measure.
- $E$ a measurable set with finite measure.
- $E$ a measurable set.
Notice that from the Lemma follows:
Corollary. If $E\subseteq \R$ is a measurable set, then $E\times \R$ and $\R\times E$ are a measurable sets of $\R^2$.
To prove the Corollary, note that $E\times\R=\bigcup_{n\in\Z} E\times [n,n+1[.$
Finally
Lemma. Let $f:\R\to\R$ a measurable function. Then the functions $F,G:\R^2\to\R$ defined by $F(x,y)=f(y),\qquad G(x,y)=f(x)$ are measurable.
Proof. Let $\alpha\in\R$. Notice that $\lbrace (x,y):F(x,y)\lt\alpha \}=\R\times \lbrace y:f(y)\lt\alpha\},$ by the corollary above, we are done.
To finish note that $\lbrace (x,y)\in\Q^2: f(y-x)\lt\alpha\}=\bigcup_{x\in\Q}\lbrace x\}\times(\lbrace y\in\Q : f(y)\lt \alpha\}+x),$ is measurable, therefore $(x,y)\mapsto f(y-x)$ is measurable.