To determine how far the truck could drive with 7 gallons of gasoline, we first calculate the truck's fuel efficiency (miles per gallon).
The truck drives 120 miles on 5 gallons of gasoline, so its fuel efficiency is:
\[ \text{Fuel Efficiency} = \frac{120 \text{ miles}}{5 \text{ gallons}} = 24 \text{ miles per gallon} \]
Now, we can calculate the distance the truck can drive with 7 gallons:
\[ \text{Distance} = \text{Fuel Efficiency} \times \text{Number of gallons} = 24 \text{ miles per gallon} \times 7 \text{ gallons} = 168 \text{ miles} \]
Therefore, the truck could drive 168 miles with 7 gallons of gasoline.