If you don't list the equations, the way to solve the problem is as follows:
There are 9 people in each room, 4 more.
Each room 10 people, two rooms are empty, that is, 20 people are missing.
It can be concluded that each room has 9 people, and each room has 10 people. Assuming it is full, there are 24 people short.
24/( 10-9)= 24 gives that there should be 24 rooms.
10 *(24-2)= 220 people or 24*9+4 = 220 people.
If the equation is simpler.
9x + 4 = 10(x - 2)
The solved x is the number of rooms, and then it is easy to calculate the number of people.
I don't know if you understand the above.