Suppose the # of litres in the small container is 'x'.
This would make '2x' litres of water in the larger container.
After taking 8 litres from both containers, the following equation can be written:
(2x-8) = 3 (x-8)
Open the brackets:
2x-8 = 3x-24
Collect like terms:
x = 16
There were 16 litres in the smaller container