The basketball team rented a bus for and out of town trip. the cost was $315 plus $0.45 per mile. if the total was $342, how many miles was the trip?