The price $p,$ in dollars, of a certain product and the quantity $x$ sold obey the demand equation
$$p=-\frac{1}{4} x+100 \quad 0 \leq x \leq 400$$
Suppose that the cost $C$, in dollars, of producing $x$ units is
$$C=\frac{\sqrt{x}}{25}+600$$
Assuming that all items produced are sold, find the cost $C$ as a function of the price $p$ [Hint: Solve for $x$ in the demand equation and then form the composite. $]$