Hello Alyssa.
If 4/7 of the class get A then 1 -4/7 = 3/7 of the class did not get A
Lets say there are x students in that class;
x*3/7 = 18.
3x = 18*7. (cancel denominator by multiplying it both sides)
3x = 126. (cancel 3)
x = 42
if 4/7 of the class get A; 4/7*42 = 24 of them get A
hope that helps