It's not clear what is meant by the"total length" in part-C.
If you only buy the 40-ft you need for the job, then it'll cost you (40) x $4.50 .
If you buy all of the pipe available at all four stores, that's 43.5625-ft,
and you'll pay (43.5625) x $4.50 .