A common rule that is used to determine which solute will dissolve in which solvent.
The rule says that liquids of similar nature are compatible with each other to get mixed up.
Gasoline is one of the non-polar liquids. Therefore, the solute should be a non-polar liquid as well to get dissolved in the gasoline. For example, wax is a non-polar liquid so gets dissolved in gasoline. In addition, gasoline comes under the category of crude oil derivative. We can say gasoline acts as a solvent of fats as well as oils.