Answer
$C=-200x+3400.$
$P=-40x^{2}+800x-3400$
At ${{\$}} 10\quad $per T-shirt, the maximum profit is ${{\$}} 600$ per week.
Work Step by Step
As a function of $q$, monthly cost is
$C=5q+400$.
To express C as a function of x, substitute $q=-40x+600$:
$C=5(-40x+600)+400$
$C=-200x+3400$.
The profit is$ \quad P=R-C$
$P=xq-C$
$P=-40x^{2}+800x-3400$
The graph of P is a parabola that opens down.
The profit is largest at the vertex, when $x=-b/(2a)$
$x=-\displaystyle \frac{800}{-2\times 40}= {{\$}} 10\quad $ per T-shirt.
The corresponding profit is
$P=-40(10)^{2}+800(10)-3400$
$P={{\$}} 600$ per week.