So the result of the number of big houses *8 should be 2 or 7.
The multiple of 8 less than 47 is 8 16 34 32 40, and only 32 meets the meaning of the question.
So the big house has 32/8=4 rooms.
-Small house (47-32 rooms) /5=3 rooms