Step-by-step explanation:
Assume that
[tex]X_i = \left \{ {{1, If , Ith, room, has,exactly, 1,man, and , 1,woman } \atop {0, othewise} \right.[/tex]
hence,
[tex]x = x_1 + x_2+....+x_m[/tex]
now,
[tex]E(x) = E(x_1+x_2+---+x_m)\\\\E(x)=E(x_1)+E(x_2)+---+E(x_m)[/tex]
attached below is the complete solution