Step-by-step explanation:
We generally assume that when multiple resources are put on a job, the completion rate is the sum of the completion rates of the different resources. Rate is generally measured in units per time. Here, the appropriate "unit" is "job".
Step 1 is convert the hours per job to a rate in terms of jobs per hour.
... Shawn can complete 1/5 job per hour.
... Ellie can complete 1/7 job per hour.
Step 2 is to add the rates to get the total rate when both resources are applied.
... (1/5 job/h) + (1/7 job/h) = (7/35 +5/35) job/h = 12/35 job/h
Step 3 is to convert that rate back to the time require to complete one job. We can divide the work to be done (1 job) by the rate at which it is done in order to find the time required.
... (1 job)/(12/35 job/h) = 35/12 h = 2 11/12 hours = 2 hours 55 minutes
The foreman is incorrect.
_____
Comment on the solution
The time when workers work together will always be between the longest time divided by the number of workers (7/2 = 3.5 hours here) and the shortest time divided by the number of workers (5/2 = 2.5 hours here). Our answer of 2.92 hours is in that range.
The foreman should know better. (If s/he were to divide the average completion time (6 h) by the number of workers (2), s/he would have a guess of 3 hours—closer, but still incorrect.)