To determine how many hours Gina can afford to have a magician, we can start by defining the total cost formula based on the given pricing structure.
The total cost \( C \) for hiring the magician can be expressed as:
\[ C = 24 + 26h \]
where \( h \) is the number of hours the magician stays.
Since Gina has a budget of $102, we can set up the equation:
\[ 24 + 26h \leq 102 \]
Subtracting 24 from both sides gives:
\[ 26h \leq 78 \]
Next, we divide both sides by 26:
\[ h \leq \frac{78}{26} \]
Calculating the right side gives:
\[ h \leq 3 \]
Thus, Gina can have the magician stay for a maximum of 3 hours.