Painter 1 works at a rate of 1/x
Painter 2 works at a rate of 1/(x - 5)
We have the following equation to represent their combined work rate
1/x + 1/(x - 5) = 1/6
6(x - 5) + 6x = x(x - 5)
6x - 30 + 6x = x² - 5x
12x - 30 = x² - 5x
x² - 17x + 30 = 0
(x - 2)(x - 15) = 0
The only solution that makes sense is x = 15 because x = 2 would give Painter 2 a rate of -3.
Painter 1 can do the job in 15 hours alone, and Painter 2 can do the job in 10 hours alone