Skip the option "Accumulation" and do it in the formula instead.
First, add expressions for the accumulated A and B:
Label these expressions "A_accumulated" and "B_accumulated".
I assume there is only one value per bin. If there are several values per bin, you need to use Sum(A) instead of A as first parameter in RangeSum.
Finally, add an expression A_accumlated/B_accumlated.
Try to calculate the accumulated curves (instead of the chart properties option) like
=rangesum(above([data A],0, rowno() ))
=rangesum(above([data B],0, rowno() ))
[for the first parameter to above, use your current expressions]
Then you could just use
=column(1) / column(2)
as division of both accumulated values.
Hope this helps,