Hint. Let $m_i$ and $w_i$ be respectively the number of men and the number of women that get out at floor $i$. Then the desired number of ways is the product of the numbers of the non-negative integer solutions of these two equations: $$\sum_{i=1}^8 m_i=6\quad\mbox{and}\quad\sum_{i=1}^8 w_i=5.$$ See Stars and Bars#Theorem_two) technique.