Bucket by barrel
Total quality water quality alcohol quality
( 1) X-Y X-Y 2Y Y
(2) X-Y/2 X-Y/4 3Y/2 3Y/4
(3)4X/5-2Y/54x/5-3Y/5x/5+7Y/54y/5
According to the fact that the mass of the liquid in the last bucket is exactly equal to the mass of the liquid in the first bucket, and 4/5X-2/5Y= Y, there is
X = 7/4 years
Barrel A: the concentration of water =(4Y/5)/Y=80%, and the concentration of alcohol =(Y/5)/Y=20%.
Barrel B: the concentration of water =( 19Y/20)/(7Y/4)=54.29%, and the concentration of alcohol =(4Y/5)/(7Y/4)=45.7 1%.