Decision over "max" production function:
Hint

For profit maximization, either $x_1$ or $x_2$ (but not both) must be zero. If not, say $x_1^*&gt;x_2^*&gt;0$ at the optimum, then one could increase profit by lowering cost by reducing $x_2^*$ without affecting output and thus revenue. 

Let $z=\max\{x_1,8x_2\}$. The profit function can be written as 
\begin{equation}
p[3(x_3)^{1/3}(z)^{1/3}]-w_3x_3-c_zz,\tag1
\end{equation}
where 
\begin{equation}
c_z=
\begin{cases}
w_1&amp;\text{if }x_1&gt;8x_2\\
w_2/8&amp;\text{if }x_1&lt;8x_2\\
\min\{w_1,w_2/8\}&amp;\text{if }x_1=8x_2
\end{cases}
\end{equation}

Solve $(1)$ for the condition determining the optimal level of $z$, and compare the costs of achieving this level using either $x_1$ or $x_2$. Use the one that entails the lower cost.