Let's call the amount of flour in bag A and B as "x".
From the problem, we know that bag C contains 940g of flour.
We can set up an equation based on the total amount of flour in the three bags:
x + x + 940 = 2500
Simplifying this equation, we get:
2x + 940 = 2500
Subtracting 940 from both sides, we get:
2x = 1560
Dividing both sides by 2, we get:
x = 780
So each of the bags A and B contain 780g of flour.