I cannot write a neat proof of this result, so I would like to see how to be precise in these kinds of arguments.. Here is the problem
Let $I=[0,1]$ and let $f\colon I\times\mathbb R\to \mathbb R$ be a function such that
i) $f(\cdot,x)$ is measurable for all $x\in\mathbb R$;
ii) $f(t,\cdot)$ is continuous for a.e. $t\in I$.
Prove that, for every continuous function $x\colon I\to\mathbb R$, the function
$g_x(t):=f(t,x(t))$ is measurable.
Thank you for your kindness..