X+Y=22.5 ( 1)
And pour half the oil first, the remaining oil is half of the original, then pour out the remaining oil, which is half of the remaining oil, and the remaining oil in the last barrel is a quarter of the original, which is X* 1/4. At this time, even if the weight of the barrel is 7.5 kg, there are:
X* 1/4+Y=7.5 (2)
At the same time (1)(2)
X=20
Y=2.5
A: The barrel weighs 2.5 kilograms and the oil weighs 20 kilograms.