a certain hobby shop sold model cars for $ 5.00 each and model trains for $ 8.00 each . if a customer purchased both cars and trains from the store for a total of $ 31.00 , what total number of cars and trains did the customer purchase ?