Hi Kevin,
I agree with you that the question itself is ambiguous (Is it 2 rooms each with n students? Or is it 2 rooms with a total of n students?). Furthermore, the logic in the solution seems incorrect as well.
I explained why the solution involves n^2 in this post: Seemingly incorrect analytical solution to Problem 4 of Birthday Lab - #5 by Jason7
Anyway, it would be great if the course provider could provide clarification and update the materials.