Barney worked 14 hours last week and earned a total of $96. His job as a lifeguard pays $8 per hour, and his job as a cashier at the hot dog stand on the beach pays only $6 per hour. How many hours did he work at each job?