4 students spend $12.
8 students would spend $24.
So, you need only two more students to buy lunch.
So HALF of what the 4 students pay, would mean 2 students pay $6. Or, each student pays $3.
So if 8 students spend $24. Add the $6 from the other two students, and the answer would be: 10 students spend $30.
To make it easier than that.
Find the price each student pays. So:
12/4= $3
Multiply $3 by the number of students.
$3 x 10 = $30