The function D(p) gives the number of items that will be demanded when the price is p. The production cost, C(x), is the cost of producing x items. To determine the cost of production when the price is $10, you would:
Evaluate C(D(10))
Evaluate D(C(10))
Solve C(D(p))=10
Solve D(C(x))=10