Solution (source code)

= Solution

Introduce nonnegative <slack variables> $s_1,s_2$ and use a <simplex tableau> with the last row representing $z-c^{\mathsf T}x=0$. The starting tableau is
$$
\begin{array}{c|rrrrr|r}
&x_1&x_2&x_3&s_1&s_2&\text{RHS}\\\hline
s_1&2&3&5&1&0&33\\
s_2&1&2&3&0&1&18\\\hline
z&-3&-4&-8&0&0&0
\end{array}
$$
Enter $x_3$ and let $s_2$ leave. Dividing the second row by three and eliminating its column gives
$$
\begin{array}{c|rrrrr|r}
&x_1&x_2&x_3&s_1&s_2&\text{RHS}\\\hline
s_1&1/3&-1/3&0&1&-5/3&3\\
x_3&1/3&2/3&1&0&1/3&6\\\hline
z&-1/3&4/3&0&0&8/3&48
\end{array}.
$$
Enter $x_1$ and let $s_1$ leave. The next <simplex tableau> is
$$
\begin{array}{c|rrrrr|r}
&x_1&x_2&x_3&s_1&s_2&\text{RHS}\\\hline
x_1&1&-1&0&3&-5&9\\
x_3&0&1&1&-1&2&3\\\hline
z&0&1&0&1&1&51
\end{array}.
$$
Thus
$$
\boxed{(x_1,x_2,x_3)=(9,0,3),\qquad z_{\max}=51.}
$$
The pivot choices and the optimality certificate are justified in the following parts.