i have the next exercise:
Let $f$ and $g$ be lebesgue measurable functions and $A$ a measurable set. Prove that the function $$h(x)=\left\{\begin{array}{ll}f(x)&\mbox{si }x\in A,\\g(x)&\mbox{ x}\not\in A,\end{array}\right.$$ is measurable.
I'm really lost, and don't know how to start this exercise any help would be appreciated.
If you have already shown that sums and products of measurable functions are measurable, then simply observe that $$ h(x)=f(x)1_A(x)+g(x)1_{A^c}(x) $$ where $1_A$ is the indicator function of the set $A$.