we know that
Joey and Rita paint a room in 8 hours
so
100%----------> 8 hours
X%----------> 1 hour
x=100/8-----> 12.5%
that means
Joey and Rita paint 12.5% of a room in 1 hour
Billy paint a room in 12 hours
so
100%----------> 12 hours
X %------------> 1 hour
x=100/12----> x=8.33 %
that means
Billy paint 8.33% of a room in 1 hour
if all three work together
then
All three paint (12.5%+8.33%) in 1 hour
20.83%------------> 1 hour
100%------------> x
x=100/20.83-----> x=4.8 hours
the answer is
4.8 hours