How to interpret the formula, A room contains m men, and w women. They leave one by one at random until only people of the same sex remain. The question is from Cambridge Admission Test 1983

A room contains m men and w women. They leave one by one at random until only people of the same sex remain. show by a carefully explained inductive argument, or otherwise, that the expected number of people remaining is $
\frac{\text{m}}{\text{w}+1}+\frac{\text{w}}{\text{m}+1}
$

I can not think of a way by what it says, "inductive argument". Also, I can not fully understand my process. My thought is:
Consider w women have arranged, then interpolate m men. Each man has the probability $
\frac{1}{\text{w}+1}
$ to be the first (which corresponds to being the remaining). Then we have the expected number of men to be the remaining is $
\frac{m}{\text{w}+1}
$.
However, similarly, we have the expected number of women remaining is $
\frac{w}{\text{m}+1}
$. But why can we directly add them together? My way of thinking suggested two mutually expectation, but it seems that we do not know whether the remaining is men or women.
 A: Number the men with $1,\dots,m$ and the women with $1,\dots,w$.
For $i=1,\dots,m$ let $X_{i}$ take value $1$ if man $i$ will be
one of the remaining persons, and value $0$ otherwise.
For $j=1,\dots,m$ let $Y_{i}$ take value $1$ if woman $i$ will
be one of the remaining persons, and value $0$ otherwise.
Then $$Z=\sum_{i=1}^{m}X_{i}+\sum_{i=1}^{w}Y_{i}$$ denotes the number
of remaining persons.
Hopefully answering your question:

"But why can we directly add them together?"

With linearity of expectation and symmetry we find:$$\mathbb{E}Z=m\mathbb{E}X_{1}+w\mathbb{E}Y_{1}=mP\left(\text{man}1\text{ remains}\right)+wP\left(\text{woman}1\text{ remains}\right)$$
Man $1$ will remain if and only if all women are leaving before him,
so: $$P\left(\text{man}1\text{ remains}\right)=\frac{1}{w+1}$$
Woman $1$ will remain if and only if all men are leaving before her,
so: $$P\left(\text{woman}1\text{ remains}\right)=\frac{1}{m+1}$$  Proved is now that: $$\mathbb EZ=\frac{m}{w+1}+\frac{w}{m+1}$$
A: If $m+w=1$ we have that $\frac{m}{w+1}+\frac{w}{m+1}=1$ which is the expected number of people remaining. 
Now let $N$ be arbitrarily given and suppose the expected number of people remaining if $m+w<N$ is equal to $\frac{m}{w+1}+\frac{w}{m+1}$.
Let $m+w=N$. Clearly if $m=0$ or $w=0$ then the expected amount of people remaining is 
$$N=\frac{m}{w+1}+\frac{w}{m+1}.$$
So we may assume that $m,w>0$. The chance a man leaves first is $\frac{m}{m+w}$, when this occurs the expected value of people remaining is $\frac{w}{m}+\frac{m-1}{w+1}$ by the induction hypothesis. In the same way the chance a woman leaves first is $\frac{w}{m+w}$ and when this occurs the expected value of people remaining is $\frac{w-1}{m+1}+\frac{m}{w}$. So the expected value of people remaining is 
$$
\frac{m}{m+w}(\frac{w}{m}+\frac{m-1}{w+1})+\frac{w}{m+w}(\frac{w-1}{m+1}+\frac{m}{w})=\frac{w}{m+w}+\frac{m}{m+w}\frac{m-1}{w+1}+\frac{m}{m+w}+\frac{w}{m+w}\frac{w-1}{m+1}=\frac{w}{m+w}(1+\frac{w-1}{m+1})+\frac{m}{m+w}(1+\frac{m-1}{w+1})=\frac{w}{m+w}\frac{m+w}{m+1}+\frac{m}{m+w}\frac{m+w}{w+1}=\frac{w}{m+1}+\frac{m}{w+1}
$$
A: Let X be the number of leavers until only men or women remains. Let $S_1=1$ if first leaver is a man.  
$\mathbb E[X(m,w)] = \mathbb E[X(m-1,w)|S_1=1]P(S_1 = 1) + \mathbb E[X(m,w-1)|S_1=0]P(S_1=0)$
$  =\mathbb E[X(m-1,w)]\frac{m}{m+w} + \mathbb E[X(m,w-1)]\frac{w}{m+w} $
Induction
For the induction let assume these two properties:


*

*$\mathbb E[X(m-1,w)] = \frac {m-1}{w+1} + \frac w{m}$ 

*$\mathbb E[X(m,w-1)] = \frac {m}{w} + \frac {w-1}{m+1}$
Then,
$\begin{align} \mathbb E[X(m,w)] &= (\frac {m-1}{w+1} + \frac w{m})\frac{m}{m+w} +  (\frac {m}{w} + \frac {w-1}{m+1})\frac{w}{m+w} \\
& = (\frac {m-1}{w+1} +1)\frac{m}{m+w}  + (1+\frac {w-1}{m+1})\frac{w}{m+w} \\
& = \frac {m}{w+1} + \frac {w}{m+1} 
\end{align}$
Initialization:


*

*$\mathbb E[X(0,1)] = \mathbb E[X(1,0)] = 0 $
