Answer
a. $q=\sqrt {\frac{2km}{h}}$
b. $q=\sqrt {\frac{2km}{h}}$.
Work Step by Step
a. Given the cost equation $A(q)=\frac{km}{q}+cm+\frac{hq}{2}$, take its derivative to get $A'=-\frac{km}{q^2}+0+\frac{h}{2}$. Let $A'=0$; we get $q^2=\frac{2km}{h}$ and select the positive root to get $q=\sqrt {\frac{2km}{h}}$. Check $A''=\frac{2km}{q^3}\gt0$; thus this critical $q$ value gives a minimum cost $A(q)$.
b. Replacing $k$ with $k+bq$, we have $A(q)=\frac{km+bmq}{q}+cm+\frac{hq}{2}=\frac{km}{q}+bm+cm+\frac{hq}{2}$, resulting in the addition of a constant term $bm$. Repeat the process in part (a) and the minimum cost happens at the same $q=\sqrt {\frac{2km}{h}}$.