Solution: It is known that it takes 40 days for A to do it alone and 24 days for B to do it alone, that is, the work efficiency of A and B is 1/40 and 1/24 respectively.
Cooperation needs of Party A and Party B1/[(1/40)+(1/24)] =15 (days).
Therefore, the total length = 750/[(15/24)-(1/2)] = 6000 (meters).