In this problem we can made an equation that represent the cost of the taxi, so y will be the final cost, and x the number of miles that he rides so the equation will be:
![y=2x+4](https://img.qammunity.org/2023/formulas/mathematics/high-school/s55plg1thf5uugnuw8kir02s96aan8i8kw.png)
So if he paid 34 dollars, we replace y=34 and solve for x:
![\begin{gathered} 34=2x+4 \\ 34-4=2x \\ (30)/(2)=x \\ 15=x \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/dhzu462hr3rfactfbm1rr3d942joccrenw.png)
that means that he drives 15 miles