Similar substances tend to mix with other substances, thus polar substances mix easily with other substances and nonpolar substances mix with nonpolar substances. We have three substances, let's see what is the polarity of each substance.
Water: Polar
Oil: Nonpolar
Gasoline: Nonpolar
According to the above, since the oil and gasoline are non-polar, they will be mixed. In contrast, water, which is polar, does not mix with oil.
So, the answer will be the First option: Both oil and gasoline molecules are nonpolar, while water is polar. Nonpolar solvents have a tendency to dissolve other nonpolar molecules.