A school cafeteria sells sandwiches for $4.50 each, cartons of milk for $1 and bananas for $0.50 each. One table of students spent $36.00 total. They bought 2 more milks than sandwiches and they bought two time more sandwiches than bananas. How many bananas did the students buy?

m=s+2

s = 2b
4.50s + 1.00m + 0.50b = 36.00

m = 2b+2
now just substitute in for m and s to get
4.50(2b) + 1.00(2b+2) + 0.50b = 36.00
b = 68/23

Is there a typo somewhere in the problem or in my math?

4.5(2b)= 9b

1(2b+2)= 2b+2

9b+2b+2+.5b=36
9b+2b+0.50b=36-2
11.5b=34
b=34/11.5

To solve this problem, let's assign variables to the unknown quantities. Let's say the number of sandwiches is S, the number of cartons of milk is M, and the number of bananas is B.

We are given the following information:

1. The price of each sandwich is $4.50.
2. The price of each carton of milk is $1.
3. The price of each banana is $0.50.
4. The total amount spent by the students is $36.00.
5. The students bought 2 more cartons of milk than sandwiches.
6. The students bought two times more sandwiches than bananas.

From the information given, we can set up the following equations:

Equation 1: 4.50S + 1M + 0.50B = 36.00 (since the total amount spent is $36.00)
Equation 2: M = S + 2 (since they bought 2 more cartons of milk than sandwiches)
Equation 3: S = 2B (since they bought two times more sandwiches than bananas)

Now, let's substitute Equation 3 into Equation 2 to eliminate S:

M = 2B + 2

Substituting Equation 3 and the modified Equation 2 into Equation 1:

4.50(2B) + 1(2B + 2) + 0.50B = 36.00

Simplifying the equation:

9B + 2 + 2B + 0.50B = 36
11.50B + 2 = 36
11.50B = 34
B ≈ 2.9565

Since we can't have a fraction of a banana, we round B to the nearest whole number. Therefore, the students bought approximately 3 bananas.