dividing 40 players into pairs There will be 20 defense players and 20 offensive players.

in each room there are 2 players, if the choosing is random, what is the probability that there will not be a room in which there is one defense player and one offensive player?
there are $40 \choose 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 $ ways to orders the players to pair of 2, 

but in the book they write that there are $40!\choose2^{20}*20!$ 

Why is that?
 A: Imagine that the rooms are numbered $1,2,3,\dots,20$ and that in each room there is a bunk bed. Line up the $40$ people. First person gets top bunk, Room $1$. Second person gets bottom bunk, Room $1$. Third person gets top bunk, Room $2$. And so on.
There are $40!$ equally likely room and bunk assignments. 
Now we count the number of room and bunk assignments in which people in the same room are of the same type.   The  rooms for the offensive players can be chosen in $\binom{20}{10}$ ways. For each choice the players can be assigned to rooms and bunks in $20!$ ways. And then the defensive players can be assigned to rooms and bunks in $20!$ ways. That yields probability $\frac{\binom{20}{10}20!20!}{40!}$. 
Another way: We could still keep the rooms numbered, but forget about the bunks. Then instead of factorials we get multinomial coefficients. The denominator gets divided by $2^{20}$. Each $20!$ in the numerator gets divided by $2^{10}$. 
A: There are $\frac{40!}{2^{20}}$ ways to put the players into the rooms, with no conditions.
If we were to put the defensive with the defensive, there are $\binom{20}{10}$ ways to pick the rooms for the defensive men, and then $\frac{20!}{2^{10}}$ ways to put the defensivement in those rooms, and $\frac{20!}{2^{10}}$ ways to put the offensive men in the other rooms, for a total of:
$$\binom{20}{10}\frac{20!20!}{2^{20}}$$
That means that the probability should be $$\frac{\binom{20}{10}\frac{20!20!}{2^{20}}}{\frac{40!}{2^{20}}}=\frac{20!^3}{10!10!40!}\approx 1.3\times 10^{-6}$$
More general, in a team with $2a$ offensive and $2b$ defensive, and $a+b$ rooms, you'd get:
$$\frac{(2a+2b)!}{2^{a+b}}$$ different ways of putting the players in the room, and $$\binom{a+b}{a}\frac{(2a)!}{2^a}\frac{(2b)!}{2^b}$$
different ways up putting the payers together by type, yielding a probability of:
$$\frac{(a+b)!(2a)!(2b)!}{a!b!(2a+2b)!}$$
In your case, $a=b=10$.
Even more generally, if each room holds $k$ players, and you have $m$ positions with $ka_i$ players of position $i=1,\dots,m$, then the number of ways of arbitrarily rooming the players is:
$$\frac{(k(a_1+\dots+a_m))!}{(k!)^{a_1+\dots+a_m}}$$
The number of ways of picking the rooms with each room having only players of one position is:
$$\binom{a_1+\dots+a_m}{a_1,\dots,a_m}\prod_{i=1}^m \frac{(ka_i)!}{(k!)^{a_i}}$$
Taking the ratio, we get:
$$\frac{(a_1+\dots+a_m)!(ka_1)!(ka_2)!\dots(ka_m)!}{(k(a_1+\dots+a_m))!a_1!\dots a_m!}$$
If $n=a_1+\dots a_m$ is the number of rooms, then this is:
$$\frac{\binom{n}{a_1,\dots,a_m}}{\binom{kn}{ka_1,\dots,ka_m}}$$
That's an interesting formula. The way to think of it is in terms of assigning the players positions after their rooms. There are $\binom{kn}{ka_1,\dots,ka_m}$ ways to assign the positions, total, but once the players are put in the rooms, if the condition is that each room must contain players of one type, then there are $\binom{n}{a_1,\dots,a_m}$ ways of assigning the positions to the players that match the room assignments.
A: You ask about probability, which should be less than $1.$  What you quote from the book looks like the number of arrangements.  For your question, pick somebody to be the first in the first room.  When you pick a person to put with him, the chance he is the other type is $\frac {20}{39}$  Assuming you succeed, in the next room, again put somebody, pick a second who will be the other type with probability $\frac {19}{37}$  At the end, you have a chance of success of $\frac {20\cdot 19 \cdot 18 \dots 1}{39 \cdot 37 \cdot 35 \dots 1}=\frac {20!}{39!!}\approx 7.6 \cdot 10^{-6}$  
Added:  the above calculated the chance that every room had one offensive and one defensive player.  The question wants every room to have a matched pair.  If we line all the players up, there are $40!$ ways to do that.  Of those, we have ${20 \choose 10}$ ways to choose the rooms that will get offensive players, then $20!$ ways to put them in order, and $20!$ ways to put the defensive players in order, giving $\frac {{20 \choose 10}20!^2}{40!}\approx 1.34 \cdot 10^{-6}$.  It seems reasonable that this is close to and smaller than the first calculation.  When the first player is selected, he has a little less than (instead of a little more than) $\frac 12$ chance of being paired correctly.
A: I am going to attempt this problem over multiple cases:


*

*All players and all rooms are distinct. 


That means each player can be labelled a number $i$ and each room a number $j$ in which case there are $ 40 * 39 * 38...  = 40!$ ways to arrange them but since we have over counted (the order we introduce the players in appears to affect the result) we must divide this by (2!) to get
$$\frac{40!}{2^{20}}$$
The number of cases in which there is NOT one defensive or Offense player in the same room is given by:
$$ 20 * 19 * 18 ...  = 20! $$ ways to fill up 10 rooms with all defensive players (again divide by 2! to account for overcounting) so $\frac{20!}{2!^{10}10!}$
$$ \frac{20!}{10!10!} = 20_choose K $$ ways to select 10 rooms to be filled with defensive the players
$$ 20* 19 * 19 ... = 20! $$ ways to fill up the remaining rooms with offensive players (again divide by 2! to account for overcounting) so $\frac{20!}{2!^{10}10!}$
Therefore there are : $(\frac{20!^3}{2^{20}*10!^2}) $ ways to fill up the rooms and ensure that there is no room with one defensive and one offensive player.
Thus: the probability that no rooms have a defensive or offensive player is given by:
$$ \frac{\frac{20!^3}{2^{20}10!^4}}{\frac{40!}{2^{20}}}  =\frac{20!^3}{ 40!10!^2} $$
2. Players within their respective groups (defense and offense) are NOT distinct but rooms are all distinct.
