Brian is working his way through school. He works two part-time jobs for a total of 24 hours a week. Job A pays $5.80 per hour, and Job B pays $7.40 per hour. How many hours did he work at each job the week that he made $161.60.