The way I solved this was just having a look at the first example where it had 6 chairs.
You see on the table the top and bottom part have 2 chairs in each spot so if it there were 4 tables there would be 16. (4×4)
The you just add the other extra chairs that are in the front and the end of the table. (16+2=18 chairs)
I hope I explained this well!