Since the ratios are equivalent
Then,
3/5 = 18/ x
18/12 = x/ y
x represents the gallons of juice consumed for 6th grade
y represents the gallons of juice consumed for 7th grade
For the 6th grade 30 gallons of juice was consumed
Thus, for 7th grade 20 gallons of juice was consumed