This question is ultimately about finding the Least Common Multiple of 8 and 12. However, even if you did not realize that fact, the answer choices are numbers and we're asked to find the LEAST number of students that could be divided into 8 EQUAL teams OR 12 EQUAL teams. We can TEST THE ANSWERS until we find the match....
Let's start with the smallest and work our way up...
Answer A: 20 students. We CANNOT divide 20 students into 8 equal groups (you can't have "half a student"). Eliminate A.
Answer B: 24 students. We CAN divide 24 students into 8 groups of 3 OR 12 groups of 2. This FITS what we're looking for, so this MUST be the answer.
GMAT assassins aren't born, they're made,
Official Guide 2016 Question Breakdown:
GMAT Club Verified Reviews for EMPOWERgmat & Special Discount
EMPOWERgmat Podcast - A Wild Secret About The GMAT Algorithm