To solve this problem, we can write an equation based on the information given.
Let \( x \) represent the number of miles driven. The total cost of the trip can be expressed as:
\[ \text{Total Cost} = \text{Flat Rate} + \text{Cost per Mile} \times \text{Number of Miles} \]
According to the problem:
- The flat rate is $5.
- The cost per mile is $1.50.
- The total cost of the trip is $41.
We can set up the equation:
\[ 41 = 5 + 1.50x \]
Now, we will solve for \( x \):
- Subtract the flat rate from both sides:
\[ 41 - 5 = 1.50x \]
\[ 36 = 1.50x \]
- Now, divide both sides by 1.50 to isolate \( x \):
\[ x = \frac{36}{1.50} \]
Calculating the division:
\[ x = 24 \]
So, the trip was 24 miles.