sammy can complete programming job in 8 hours alone. marilyn can complete programming job in 12 hours alone. how many hours would it take if sammy and marilyn work together

There speeds of doing the job separately are 1/8 per hour and 1/12 per hour. Assuming they are working on the same job together and not duplicating work, their combined speed is 1/12 + 1/8 = 5/24 jobs per hour.

The same assignment done together will take 1/(5/24) = 24/5 hours, which is 4 hours and 48 minutes.