As stated, that result is false. For example, if S is a non-measurable subset of then is a null set (hence measurable) in .

To make the result correct, you need to add the hypothesis that has measure greater than 0. Then (from the arguments used to prove Fubini's theorem) almost all the slices of are measurable. But in a product set all the slices are equal to A (for horizontal slices) or B (for vertical slices). Therefore A and B are measurable.