The room should be filled completely with table. So the legth of room should be multiple of 12 and 9. Find the lcm of 12 and 9
factors of 12 are 2,2,3
factors of 9 are 3,3
rejecting a common 3
lcm =2×2×3×3=36 m
is the length of room
it can fit 3 12m tables and 4 9m tables