AKI (final) = [ AKI (old gas) x gallons (old gas) + AKI (new gas1) x gallons (new gas 1) + AKI (new gas 2) x gallons (new gas 2) ] / [ gallons (old gas) + gallons (new gas 1) + gallons (new gas 2) ]
If your goal is to repeat the AKI of the old gas, e.g. 91 AKI, the (old gas) components drop out of the equation. Also, the less old gas still in the tank, the less it affects the final AKI after fill-up. I wait until I only have about 1.5 gallons in a 18.5 gallon tank before refilling. I calculate how many gallons I need (trip odometer miles since the last fill-up / MPG since the last fill-up), divide by three, and put that many gallons of 87 AKI in. Then, I finish up with 93 AKI.
Where I live, 93 AKI is $0.55/gallon more than 87 AKI. Between my two cars, both requiring 91 AKI, I burn about two gallons / day. By blending to make 91 AKI, I save about $135/year.
Since 91 AKI is the highest AKI readily available in California and a lot of high-altitude areas, BMW tunes their "50 state" cars to get by on it. I generally drive my 535i gently to get better fuel economy (one reason I didn't get an M5), so 93 AKI likely wouldn't benefit me. I flog my other car on 91 AKI and never hear pinging. I used to very occasionally hear pinging on my E46 M3 when the engine was lugging down (e.g. going up a grade at 55 MPH in 6th gear, in the summer, with the AC on). If I'd downshift, it'd go away.
Frau Putzer's 130k mile Honda Accord is just now showing wear on the driver's floor mat. My Cobalt's wore all the way through before I even noticed. I always buy at least one set of spare OEM mats when I buy a new car. If I don't use them, the next owner gladly buys them for what I paid for them. I might lose ten years of interest, but it pays for peace of mind.