Step 1: Calculate the total man-hours required to complete the work.
Total man-hours = number of men × number of days × hours per day
\[
\text{Total man-hours} = 50 \times 15 \times 4 = 3000 \text{ man-hours}
\]
Step 2: Determine how many days 40 men working 5 hours a day will take.
\[
\text{Daily man-hours with 40 men} = 40 \times 5 = 200 \text{ man-hours per day}
\]
\[
\text{Days required} = \frac{\text{Total man-hours}}{\text{Daily man-hours}} = \frac{3000}{200} = 15 \text{ days}
\]