Firstly, let’s assume the the whole capacity the work requires is 1.
Then, let’s see how 1 man can do in 50 days: 1/5.
Further, let’s see how 1 man can do in 1 day : 1/(5×50) = 1/250.
Similarly, let’s see how 1 woman can do in 1 day: 1/(10×50) = 1/500.
Now, we have 8 men, and they can do 8*1/250 in 1 day, which is 4/125.
Besides, we have 4 women, and they can do 4×1/500 in 1 day, which is 1/125.
Therefore, all people we have can do 4/125 + 1/125 of the work in 1 day, which is 1/25.
As a result, the work takes 1/(1/25)= 25 days.