1. Operating ratios

I'm an accountant for two companies. One pays the other a commission that is intended to equalize their operating income ratios.

Revenue
- Expense
=Operating Income

Operating Ratio = Operating Income/Revenue

CompanyA pays the commission to CompanyB. CompanyA is also much larger. When CompanyA pays commission, the commission becomes an expense to CompanyA and revenue to CompanyB.

The sticky part I need calculus help for is determining what that percentage is. Say for example:

CompanyA
Revenue - 1,000,000
Expense - 600,000
Operating Income - 400,000

Operating Ratio = 400,000/1,000,000 = 40%

CompanyB
Revenue - 150,000
Expense - 120,000
Operating Income - 30,000

Operating Ratio = 30,000/150,000 = 20%

I want CompanyB to match the operating ratio of company CompanyA, so I pay CompanyB another 30,000 in commission which brings CompanyB to 40% operating ratio. The problem is, that 30,000 becomes an expense for CompanyA, which brings its operating ratio down to 37%.

I would need to do this readjustment multiple times for each to find a matching operating ratio.

I figure there's an easy answer using calculus but I can't remember how to go about it (it's been over a decade).

2. No it's not calculus, just put letters for the variables, and equate the two ratios, maybe like so...

$\displaystyle \frac{R_A - E_A}{R_A}\ =\ \frac{R_B - E_B}{R_B}$

Now plug in the given numbers, but including the commision, x...

$\displaystyle \frac{1000 - (600 + x)}{1000}\ =\ \frac{(150 + x) - 120}{150 + x}$

...?

3. Thank you, Tom. This works great (after I stumbled over the algebra for an hour - like I said, it's been a while). At some point I may have to factor a third company into the equation in a completely different way - so I may be back soon!