I'm doing this course on mathematical modeling. In lecture 2 on optimization the following optimization problem is described. The power demand function is $$ q = a * p^{b} $$ with quantity sold $q$, $a = 60 000$, price $p$ and $b = -2.5$ (called the price elasticity). The profit can be calculated by $$ profit = p*q-c*q $$ with cost per unit $c$. The question asked is then: if the cost $c = 2$ per unit, at what price is the profit maximized?
In the lecture, the problem is first solved using a brute force approach (i.e. calculating the profit for a number of different prices). Then, the optimal prize, obtained through calculus is given, which is $$price_{opt} = \frac{c*b}{1+b} $$ with $b$ the exponent in the power demand function (i.e. -2.5). This is done by derivation of the price function with respect to price $p$ and checking when the derivative is equal to 0. The answer obtained using this function is $price_{opt} = 3.33$.
My question is how to arrive at the given solution. It's not explained in the lecture, as it is not the focus of that course. I've tried expressing p in terms of q giving $p = q^{-b} * a^b$ and then plugging that into the formula for profit and deriving that, but this becomes rather complex and not at all like the answer given. Furthermore, when I search for this online I can only find examples with linear demand functions (such as this one). Many thanks in advance.