Jamel plans to take a cruise that leaves out of New Orleans and needs to rent a car to see the sights as well as travel to and from the airport. The cost of renting a car is S50 plus $0.75 per mile for every mile over 40 miles driven. If Jamel's total cost for renting the car is $122.75, use the composition of functions to find how many miles Jamel drove the car on his vacation?