Question 441932
No idea because we aren't told how much paint is needed for one room nor the other nor both together. WE are only told how much paint the painter bought.
We are not told the relationship between amount bought and the amount needed.
Assuming that 12 gallons was the exact amount needed for the two rooms
we can say that 
room one is 2x and needs 6x paint for 3 coats
room two is x and uses 2x paint for 2 coats
6x+2x=8x
8x=12
x=12/8=3/2
so room one needs 9 gallons 
and room two needs 3 gallons
assuming that the room not painted is the smaller room (we are not told which room is the non painted room) the 3 gallons are returned.