Let us first solve the cost minimization problem to derive the cost function and then use that to solve the profit maximization problem:
$$\begin{aligned} \min_{x_1,x_2,x_3} \quad & w_1x_1+w_2x_2+w_3x_3\\ \textrm{s.t.} \quad & 3(x_3)^{1/3}[\max(x_1,8x_2)]^{1/3}\geq y\\ \\ \min_{x_3}& {\begin{aligned} \begin{bmatrix} \min_{x_1,x_2} \quad & w_1x_1+w_2x_2+w_3x_3 \\ \textrm{s.t.} \quad & \max(x_1,8x_2)\geq \frac{y^3}{27x_3} \end{bmatrix} \end{aligned}} \\ \\ \text{gives} \; &(x_1,x_2)^d (w_1,w_2,y,x_3)\in \left\{\begin{matrix} \left \{ (\frac{y^3}{27x_3},0),(0,\frac{y^3}{216x_3}) \right \} & \text{if} \; \frac{w_1}{w_2}=\frac{1}{8}\\ \left \{ (\frac{y^3}{27x_3},0) \right \} & \text{if} \; \frac{w_1}{w_2}<\frac{1}{8} \\ \left \{ (0,\frac{y^3}{216x_3}) \right \} & \text{if} \; \frac{w_1}{w_2}> \frac{1}{8} \end{matrix}\right.\\ \text{for}\; \frac{w_1}{w_2} \leq \frac{1}{8}: \; &\min_{x_3 >0 } \; w_3x_3+w_1\frac{y^3}{27x_3} \\ \text{for}\; \frac{w_1}{w_2}> \frac{1}{8}: \; &\min_{x_3 >0 } \; w_3x_3+w_2\frac{y^3}{216x_3} \\ \therefore \; & \boxed{(x_1,x_2,x_3)^d(w_1,w_2,w_3,y)= \left\{\begin{matrix} (\sqrt{\frac{w_3y^3}{27w_1}},0,\sqrt{\frac{w_1y^3}{27w_3}})& \; \text{if} \; \frac{w_1}{w_2}\leq \frac{1}{8} \\ (0,\sqrt{\frac{w_3y^3}{216w_2}} ,\sqrt{\frac{w_2y^3}{216w_3}})& \; \text{if} \; \frac{w_1}{w_2} > \frac{1}{8} & \end{matrix}\right.} \end{aligned}$$
using the input demands, we can determine the cost function: $$\boxed{C(w_1,w_2,w_3,y)=\left\{\begin{matrix} y^{3/2}(\frac{w_1w_3}{27})^{1/2} & \text{if} \; \frac{w_1}{w_2} \leq \frac{1}{8}\ \\ y^{3/2}(\frac{w_2w_3}{27})^{1/2} & \text{if} \; \frac{w_1}{w_2}>\frac{1}{8}\end{matrix}\right.}$$
Since the technology is of DRS nature and assuming that the firm is a price taker, we can obtain the supply function by using the FOC of the profit maximization problem of a competitive firm:
$$\begin{aligned}
& p=C'(y)=\left\{\begin{matrix} \frac{3}{2}(\frac{w_1w_3}{27})^{1/2}y^{1/2} & \text{if} \; \frac{w_1}{w_2} \leq \frac{1}{8}\ \\ \frac{3}{2}(\frac{w_2w_3}{27})^{1/2}y^{1/2} & \text{if} \; \frac{w_1}{w_2}>\frac{1}{8}\end{matrix}\right. \\ \\
\text{supply function is} \; & \boxed{y^s(p,w_1,w_2,w_3)=\left\{\begin{matrix} \frac{12}{w_1w_3}p^2 & \text{if} \; \frac{w_1}{w_2} \leq \frac{1}{8}\ \\ \frac{12}{w_2w_3}p^2 & \text{if} \; \frac{w_1}{w_2}>\frac{1}{8}\end{matrix}\right.}
\end{aligned}$$