To solve these type of question we should always remember that man power is inversely proportionate to the work done.
That means if we double the manpower work done will be half. and when we reduce the manpower to the half time take to complete the work will be double.
To find the contribution of each man (this is a sexist problem as women could work as well, but that’s besides the point) take 5/2 and then multiply that value by 20 and you’ll find it takes 50 hours for two men to do it.