It takes 30 minutes for 3 people to clean four identical rooms. How long would it take 9 people to clean 12 of the same rooms at the same rate?

I find the phrase "same rate" confusing.

I would take the phrase as meaning that the people are being regarded as interchangeable (rather than some of them being faster or slower than some others), and that they complete the same amount of work in the same amount of time, regardless of how many people are there (so nobody gets in anybody else's way).

My answer is 30 minutes but my teacher says it is 90 minutes and I can't understand why

Here's another way of doing this:

If three people can clean four rooms in half an hour, then they can clean eight rooms in an hour. (A full hour can be easier to work with.)

"Three people working for one hour" is three man-hours. So eight rooms require three man-hours. Dividing, we find that one room requires 3/8 of a man-hour.

They now want us to consider twelve rooms. Multiplying, we find that this will require 9/2 man-hours. If we split this between nine workers, then we find that they take 1/2 of an hour.

So your answer is correct. Maybe the teacher should be required to show his/her work...?