We will caluclate the cost per gallon first. Then, we will multiply the new quantity by this cost, so we get the new cost.
As we are told that 6 gallons costs 26.58, we can divide 26.58 by 6 to calculate the cost per gallon. It would be

Now we multiply this quantity by 18, so we get the cost of 18 gallons. It would be

so the cost of 18 gallons is 79.74