Not quite. Where did you get the 8 from? Let's start with the equation you have.
18x(number of 18-foot pipes)=20(x-10 sections of pipe)
Using the distributive property, we get 18x=20x-200
Solving for x, we get -2x=200 x=100
Substitute 100 for x in the term 18x. 18*100=1800