I not exactly sure if this is right but with the numbers that you are given, you can do a simple division problem of 91/30=3.0999 because you don't want decimals, you need a solid number of gallons you must buy you would have to buy 4 gallons for that 91 octane mix, leaving you with some gas.
Hope I helped you!