When we have a number followed by the "%" it means that this number is divided in 100 parts, so we can represent it with a fraction as shown below:
In order to determine the percentage of ice cream that was sold, we need to multiply the fraction above by the initial amount they had. This is done below:
They sold 49.14 gallons.