3/8 of the mixture is white; 5/8 is black. Then for 2 gallons of mixture,
.. (3/8)*2 gal = 3/4 gal
of white paint are needed, and
.. (5/8)*2 gal = 5/4 gal
of black paint are needed.
Rounding up to the nearest 1/2 gallon,
.. 1 gallon of white and 1 1/2 gallons of black must be purchased, for a total of 2 1/2 gallons of paint.