Let total work = LCM of 12.5, 18.75, and 15 = 75 units
Part of work done by A and B together in 1 day = 75/12.5 = 6 units
Part of work done by B and C together in 1 day = 75/18.75 = 4 units
Part of work done by A and C together in 1 day = 75/15 = 5 units
Part of work done by A, B, and C together in 1 day = (6 + 4 + 5)/2 = 7.5 units
Part of work done by C alone in 1 day = 7.5 - 6 = 1.5 units
Part of work done by D alone in 1 day = 40% of 1.5 = 0.6 units
Part of work done by A, B, C, and D together in 1 day = (6 + 4 + 5)/2 + 0.6 = 8.1 units
Time taken by A, B, C, and D together to finish the work = 75/8.1 = 9(7/27) days