It's a "guideline" from the 3.5 FAQ.
As part of an answer to the question
If a monster has resistance and vulnerability to the same kind of damage (such as fire), which effect is applied first? And when does the saving throw come in?"
the answerer (who I think is Skip Williams, but the compiled D&D 3.5 FAQ doesn't specify authors) had this to say:
As a general guideline, whenever the rules don't stipulate an order of operations for special effects (such as spells or special abilities), you should apply them in the order that's most beneficial to the creature. In the case of damage, this typically means applying any damage-reducing effects first,
before applying any effects that would increase damage.
... and that's it.
Now, let's make note of a few things.
- The "guideline" isn't in a rule book. It doesn't cite actual rules. It's a paragraph in an article that lies well outside the main body of rules.
- The original question had a clearly defined scope, the one of interacting resistances and vulnerabilities. Even though the phrasing of the sentence on its own implies this can be applied in all D&D 3.5 situations ever ("As a general guideline..."), we must not forget its original context.
- Under no reading is this a hard rule. It's explicitly written as a guideline. Something a GM can reach to to resolve sticky rule situations.
In online discussions, this "rule" is mentioned in all sorts of contexts (a casual Google search for 'D&D 3.5 "most beneficial order"' or similar should reveal dozens of instances). In all but a handful of cases, the text of the "rule" won't be cited. That's because it doesn't exist. "Most beneficial order" is a phrase that haunts online communities.
Does that mean it's useless? No, probably not. It's as good as any other way to do it. You just won't find it in a rule book.