A taxi cab in Myrtle Beach charges $2 per mile and $1 for every person. If a taxi cab ride for two people costs $12 how far will the cab travel?​