There was a total of 20 800 sacks of rice in Factory A and factory B. After 3/4 of

the sacks of rice in Factory A and 3/5 of the sacks of rice in Factory B were sold,
there were 1040 more sacks of rice in Factory b than Factory A. How many sacks
of rice were there in each factory at first?

A + B = 20800 so A = 20800-B

(1/4) A + 1040 = (2/5) B or 5 A - 8 B = -20* 1040 = - 20800

5 (20800-B) - 8 B = -20800
5 (20800) - 5 B - 8 B = -20800
6 (20800) = 13 B
etc