The proportions 2:3:5 have to be preserved.
So if we use 2U gallons of x then we must use 3U gallons of y and 5U gallons of z, to get 10U gallons of the preparation.
We would like U to be as big as possible.
As we have 12 gallons of x, 2 is not more than 12, i.e. U is not more than 6.
As we have 21 gallons of y, 3 is not more than 21, i.e. U is not more than 7.
As we have 30 gallons of z, 5 is not more than 30, i.e. U is not more than 6.
So the maximum value of U is 6 and we can make 6×10=60 gallons of the preparation.