This is the concept of proportionality, we are required to calculate the total time it will take the two men to complete the job given that:
Sam would take 4 days and the trainee would take 6 days;
Here proceed as follows;
Proportion of worked completed by Sam in 1 day will be:
1/4
Proportion of work completed by the trainee in 1 day will be:
1/6
Proportion of worked completed by them working together in 1 day will be:
1/6+1/4
=5/12
Time taken for the to complete the entire wall will be:
12/5
= 2 2/5 days