Let $z = f(x,y)$ be a continuous function on $\mathbb{R}^2$, and $g_1(x), g_2(x)$ be real valued functions on $\mathbb{R}^1$. Prove $F(x) = f(g_1(x), g_2(x))$ is a measurable function on $[a,b]$?
Proof Attempt. We need to show that the set
$$F^{-1}\left([-\infty, c]\right) = \{ x \in [a,b]: F(x) \leq c\} = \{ F \leq c\}$$
is measurable. It is equivalent to show. that $\{f\left(g_1(x), g_2(x)\right) \leq c\}$ is measurable. At this point I think I want to say something like, since $f$ is continuous and its argument set $[g_1(x), g_2(x)] = [x,y]$ is measurable then $f$ is measurable. But how do I show that? Or am I heading in the wrong direction? The definition of function measurability is confusing for me.
Recall the composition of two measurable functions is measurable. Since $f$ is continuous, it is measurable. Let $g:\mathbb{R} \rightarrow \mathbb{R}^2$ map $x$ to $g(x) = (g_1(x),g_2(x))$. If $A = I_1 \times I_2 \subset \mathbb{R}^2$ is a rectangle (Cartesian product of intervals $I_1 \subset \mathbb{R}$ and $I_2 \subset \mathbb{R}$), then $$ \lbrace g(x) \in A \rbrace = \lbrace g_1(x) \in I_1 \rbrace\, \cap\, \lbrace g_2(x) \in I_2 \rbrace $$ Since $g_1$ and $g_2$ are measurable, each of the two sets on the right-hand side is measurable. This proves $g$ is measurable. Thus, $f\circ g$ is measurable.