This is how you do it
Let m be the time taken by the master alone.
Apprentice takes (m + 15) hours to build a machine
so apprentice builds 1/(m + 15) machines in 1 hr
Master takes m hours to build a machine
so master makes 1/m machines in 1 hr
From the above we find that
Apprentics and master together will build
1/(m + 15) + 1/m machines in 1 hour
but we are told that apprentics and master together
take (m - 5) hours to build a machine
so together they make 1/(m - 5) machines per hour
Equating te ave two conclusions we get:
1/(m + 15) + 1/m = 1/(m - 5)
from now on it is just algebra.
(m + m + 15)/m(m + 15) = 1/(m - 5)
m(m + 15) = (m - 5)(2m + 15)
m^2 + 15m = 2m^2 + 5m -75
0 = m^2 - 10m - 75
0 = (m - 15)(m + 5)
so either (m - 15) = 0 implies m = 15
or (m + 5) = 0 which implies m = -5
In this situation, negative answers are meaningless
so m = 15 is the answer required.