Let
x--------> the total length of the water main
we know that
the number of 20 ft pipes is x/20
and
the number of 18 ft pipes is x/18
Since they differ by 14 pipes,
we have the equation
x/18 - x/20 = 14
Solve for x (by canceling fractions)
20x - 18x = 14*18*20
x = (14*18*20)/2
x = 2,520 ft
therefore
the answer is
the total length of the water main is 2,520 ft