Ratio of sums vs sum of ratio
If you assume that both $f$ and $g$ are nonnegative, you have $A(x, y) \leq B(x, y)$.
Proof:
$ \frac{f(x, y, z)}{\sum_{z}g(y, z)} \leq \frac{f(x,y,z)}{g(y,z)} $, since $g(y, z) \leq \sum_{z}g(y, z)$.
So $A(x,y) = \frac{\sum_z f(x,y,z)}{\sum_z g(y,z)} = \sum_z \frac{f(x, y, z)}{\sum_z g(y, z)} \leq \sum_z \frac{f(x, y, z)}{g(y, z)} = B(x,y)$.