Since D(p) gives the number of items, it can be used as an argument of the function C(x), because x is also the number of items. Then, we can write
x = D(p) : number of items when the price is p
C(x) = C(D(p)) : cost when the price is p
Therefore, when the price is 9, to find the cost we can:
Evaluate C(D(9))