its whole based on understanding actually
as we know Dividend=Divisor*Quotient+Remainder
Sometimes the members sit at tables with 3 members at one table and 4 members at each of the other tables
Let's take the 1 scenario; the remainder is 3 and Divisor is 4
Dividend = 4*Q1+3
sometimes they sit at tables with 3 members at one table and 5 members at each of the other tables
The second scenario is again the remainder is 3 divisor is 5
Dividend =5*Q2+3 ,,
Equate 4*Q1+3=5Q2+3
4Q1=5Q2 now you can find Q1=5 Q2=4 as dividend is X Put the value of q1 and q2 X=23