In 3 hours, one good worker can paint one fourth of your house. Three good workers can thus paint three fourths of your house in three hours, leaving one fourth to be done by bad workers.
One bad worker can paint one twelfth of your house in 3 hours. There are three twelfths in one fourth, so you will need to hire three bad workers to have your house painted on time.