The ratio of gas to oil in the mixture is 5 gallons of gas for every 2 gallons of oil. To find out how much oil Randi needs for 8 gallons of gas, we can set up a proportion based on the given ratio.
The proportion can be written as:
\[ \frac{5 \text{ gallons of gas}}{2 \text{ gallons of oil}} = \frac{8 \text{ gallons of gas}}{x \text{ gallons of oil}} \]
Cross-multiplying gives:
\[ 5x = 2 \cdot 8 \]
Calculating the right-hand side:
\[ 5x = 16 \]
Now, divide both sides by 5 to solve for \(x\):
\[ x = \frac{16}{5} = 3.2 \]
Thus, Randi will need 3.2 gallons of oil for 8 gallons of gas.