This is a shared work problem where each will do a fraction of the work and the two fractions have to add up to 1.
Let's a be the time which the apprentice do the job alone.
Fraction of the job done by roofer is 12/16 and fraction of the job done by apprentice is 23/a. All together they finish the job or
12/16+23/a=1
Solving for a:
23/a=1-12/16
23/a=4/16
a=92