A group of $n$ students is assigned seats for each of two classes in the same classroom. How many ways can these seats be assigned if no student is assigned the same seat for both classes?
Okay, so this can be done like this. First, I have $n!$ ways to seat $n$ students in class $1$ of the classroom, and then when class $2$ begins, I make sure these $n$ students sit in $D_n$ ways (where $D_n$ is the number of derangements of $n$ numbers).
Now, there are $n!$ initial seating arrangements for any one of the two classes.
Hence, the total ways must be $$2 \times n! \times D_n.$$
Am I correct?
Suppose there are only $2$ students.
Then the possible arrangement are
$$(1,2,2,1)$$
and
$$(2,1,1,2)$$
Notice that $$2!D_2=(2)(1)=2$$
Your argument is almost right besides that we shouldn't have multiplied by $2$, that is it should be $n!D_n$.