If you have the percentage of an amount, you just have to multiply the amount by the decimal form of the percentage. The decimal form of a percentage is the percentage divided by the 100 (or, moving the decimal place two spaces to the left).
In this case, the percentage is 42%, so we multiply 18 by 0.42 to get the answer:
18 gallons × 0.42 = 7.56 gallons
7.56 gallons of it is white.