Solving for profit function $\pi (w,p)$ given the output of production function $f(z) = \sqrt{2z_1 + 3z_2}$
The production function has a particular feature: the inputs are perfectly substitutable. One unit of input 1 can be substituted by 2/3 of input 2 to produce the same quantity of output.
Intuitively, a producer would optimally use only one output to produce.
Suppose the production plan is $(z_1,z_2)$. By choosing $(z_1-1,z_2+2/3)$, the firm produces the same quantity but profits are increased by $w_1-2/3w_2$. We can conclude: the producer would buy only input 1 ($z_2=0$) if $w_1&lt;2w_2/3$, and they would buy only input 2 ($z_1=0$) if $w_1&gt;2w_2/3$. From that point, you can solve the maximisation problem by distinguishing these two cases.
The question can also be solved as a constrained optimisation problem if you add the constraints $z_1\geq 0$ and $z_2\geq 0$ to the Lagrangian. If $\lambda_1$ and $\lambda_2$ denote the Lagrangian parameters of these two constraints, you obtain the two cases aforementioned when i) $\lambda_1=0$ and ii) $\lambda_2=0$.