If Mercedes alone could paint the house in 8 hours, we would expect that both painting together would take less than 8 hours.
In 1 hour: Dorie would paint 1/12 of the house, while Mercedes would paint 1/8. This is a total of 1/12 + 1/8 = 5/24. If they can combine to paint 5/24 of the house in 1 hour, then the total time for the whole house would be
1 / (5/24) = 24/5 = 4.8 hours or 4 4/5 hours