Artificial intelligent assistant

How many different ways are there for eight men and five women to stand in a line so that no two women stand next to each other? How many different ways are there for eight men and five women to stand in a line so that no two women stand next to each other? I have the answer as $P(8,8) \cdot P(9,5)$ But how is $P(9,5)$ possible? Please, anyone explain this to me.

We can line up the eight men in $P(8, 8)$ ways. This creates nine spaces, seven between successive males and two at the ends of the row. $$\square M \square M \square M \square M \square M \square M \square M \square M \square$$ To ensure that the women are separated, we must place the five women in five of those nine spaces, which can be done in $P(9, 5)$ ways.

Another way to think about it: To ensure that the women are separated, we choose five of the nine spaces in which to place a woman, which can be done in $\binom{9}{5}$ ways. The five women can then be arranged in those spaces in $5!$ ways. Hence, the number of ways the women can be placed in the line once the men have been arranged is $$\binom{9}{5}5! = \frac{9!}{5!4!} \cdot 5! = \frac{9!}{4!} = \frac{9!}{(9 - 5)!} = P(9, 5)$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cebd7249400c5173555ea42576b9e3b1