To determine how many gigabytes of data Gavin can use while staying within his monthly budget of $86.50 with his cell phone plan, we start by setting up the equation based on the given information.
Gavin's total monthly cost consists of a flat fee plus a variable cost based on the amount of data used. The flat cost is $62.50 and the cost per gigabyte is $5. Therefore, we can express the total cost \( C \) as:
\[ C = 62.50 + 5g \]
where \( g \) represents the number of gigabytes of data used.
Gavin wants to keep his bill at $86.50, so we set up the equation:
\[ 62.50 + 5g = 86.50 \]
To solve for \( g \), we first subtract the flat cost from both sides:
\[ 5g = 86.50 - 62.50 \]
Calculating the right-hand side:
\[ 5g = 24.00 \]
Next, we divide both sides by 5 to isolate \( g \):
\[ g = \frac{24.00}{5} = 4.8 \]
Since Gavin cannot use a fraction of a gigabyte in practical terms, we round down to the nearest whole number. Thus, the maximum number of gigabytes Gavin can use while staying within his budget is:
\[ \boxed{4} \]