Answer:
1.50x + 375 = 1254
x = 586
So the class has 28 students and ideally they should all sell a certain amount equally.
so, 586/28 = 20.93 = 21
So in average every student would have to sell 21 bags of cookies
extra:
Just do a new equation
1.5x - 0.20x = 879$
1.3x = 879
x = 676.15 = 676
So they have to sell 676 bags of cookies to cover for the cost of the cookies and for the trip.