Hello Audrey,
There are a few ways to solve this. Since we're talking about the same job for the 5 men as the 10 men, you can set up proportions:
10/5 = x/24
where x is the number of hours the 10 men would take.
Multiply both sides by 24:
24*(10/5) = x
You can simplify it by hand or do it in the calculator from here.
Cheers.