First, write the constraints with slack variables:
\begin{align*}
x_1 + x_2 + x_3 \amp = 15 \\
2x_1 + 3x_2 + x_4\amp = 38 \\
4x_1 + x_2 + x_5 \amp = 56\\
x_1 + 5x_2 + x_6 \amp = 62
\end{align*}
where all variables need to be nonnegative or
\(x_1, x_2, x_3, x_4, x_5, x_6 \geq 0\) and the objective function can be written as
\(-2x_1 - 7x_2 + z = 0 \)
Next, write these in tableau form.
\begin{equation*}
\left[\begin{array}{rr|rrrrr|r} 1 \amp 1 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp 15\\ 2 \amp 3 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 38\\ 4 \amp 1 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 56\\ 1 \amp 5 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 62\\ \hline -2 \amp -7 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0\\ \end{array} \right]
\end{equation*}
and then we use Phase II of the Simplex Method. We first check if it is optimal, but since there are negative numbers in the objective (bottom) row, this is not optimal. To determine the pivot note we start with the leftmost negative number in the objective row or column 1 and form the
\(\boldsymbol{b}\)-ratio or
\begin{equation*}
\begin{bmatrix} 15/1 \\ 38/2 \\ 56/4 \\ 62/1 \end{bmatrix} = \begin{bmatrix} 15 \\ 19 \\ 14 \\ 62 \end{bmatrix}
\end{equation*}
and smallest nonnegative above is 14 in the 3rd row. (this corresponds to the
\(x_5\) variable). Therefore we perform a matrix pivot on row 3, column 1, which corresponds to the tableau pivot of
\(1 \mapsto 5\text{.}\)
\begin{equation*}
\left[\begin{array}{rr|rrrrr|r} 0 \amp 3 \amp 4 \amp 0 \amp -1 \amp 0 \amp 0 \amp 4\\ 0 \amp 10 \amp 0 \amp 4 \amp -2 \amp 0 \amp 0 \amp 40\\ 4 \amp 1 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 56\\ 0 \amp 19 \amp 0 \amp 0 \amp -1 \amp 4 \amp 0 \amp 192\\ \hline 0 \amp -26 \amp 0 \amp 0 \amp 2 \amp 0 \amp 4 \amp 112\\ \end{array} \right]
\end{equation*}
Check if the objective row has negatives and it does in column 2. Again form
\(\boldsymbol{b}\)-ratio for this column or
\begin{equation*}
\begin{bmatrix} 4/3 \\ 40/10 \\ 56/1 \\ 192/19 \end{bmatrix} \approx \begin{bmatrix} 1.333 \\ 4 \\ 56 \\ 10.105 \end{bmatrix}
\end{equation*}
and the smallest nonnegative ratio is in the first row, we perform a tableau pivot of
\(2 \mapsto 3\text{.}\)
\begin{equation*}
\left[\begin{array}{rr|rrrrr|r} 0 \amp 3 \amp 4 \amp 0 \amp -1 \amp 0 \amp 0 \amp 4\\ 0 \amp 0 \amp -10 \amp 3 \amp 1 \amp 0 \amp 0 \amp 20\\ 3 \amp 0 \amp -1 \amp 0 \amp 1 \amp 0 \amp 0 \amp 41\\ 0 \amp 0 \amp -19 \amp 0 \amp 4 \amp 3 \amp 0 \amp 125\\ \hline 0 \amp 0 \amp 26 \amp 0 \amp -5 \amp 0 \amp 3 \amp 110\\ \end{array} \right]
\end{equation*}
There are still negatives in the objective row, so this is not optimal. The leftmost negative in the objective row is in column 5, so we form
\(\boldsymbol{b}\)-ratio for this column or
\begin{equation*}
\begin{bmatrix} 4/(-1) \\ 20/1 \\ 41/1 \\ 125/4 \end{bmatrix} = \begin{bmatrix} -4 \\ 20 \\ 41 \\ 31.125 \end{bmatrix}
\end{equation*}
and the smallest nonnegative value is in row 2, so we will perform a tableau pivot of
\(5 \mapsto 4\text{.}\) The new tableau is:
\begin{equation*}
\left[\begin{array}{rr|rrrrr|r} 0 \amp 1 \amp -2 \amp 1 \amp 0 \amp 0 \amp 0 \amp 8\\ 0 \amp 0 \amp -10 \amp 3 \amp 1 \amp 0 \amp 0 \amp 20\\ 1 \amp 0 \amp 3 \amp -1 \amp 0 \amp 0 \amp 0 \amp 7\\ 0 \amp 0 \amp 7 \amp -4 \amp 0 \amp 1 \amp 0 \amp 15\\ \hline 0 \amp 0 \amp -8 \amp 5 \amp 0 \amp 0 \amp 1 \amp 70\\ \end{array} \right]
\end{equation*}
This is still not the optimal solution (there is a negative in the objective row), so again we form
\(\boldsymbol{b}\)-ratio for column 3 or
\begin{equation*}
\begin{bmatrix} 8/(-2) \\ 20/(-10) \\ 7/3 \\ 15/7 \end{bmatrix} \approx \begin{bmatrix} -4 \\ -2 \\ 2.3333 \\ 2.143 \end{bmatrix}
\end{equation*}
and the smallest ratio is in row 4. A tableau pivot of
\(3 \mapsto 6\) is performed to get:
\begin{equation*}
\left[\begin{array}{rr|rrrrr|r} 0 \amp 7 \amp 0 \amp -1 \amp 0 \amp 2 \amp 0 \amp 86\\ 0 \amp 0 \amp 0 \amp -19 \amp 7 \amp 10 \amp 0 \amp 290\\ 7 \amp 0 \amp 0 \amp 5 \amp 0 \amp -3 \amp 0 \amp 4\\ 0 \amp 0 \amp 7 \amp -4 \amp 0 \amp 1 \amp 0 \amp 15\\ \hline 0 \amp 0 \amp 0 \amp 3 \amp 0 \amp 8 \amp 7 \amp 610\\ \end{array} \right]
\end{equation*}
And now the tableau is in optimal formβthere are no negatives in the objective row. The basic solution for this is
\begin{equation*}
\boldsymbol{x} = \frac{1}{7} \left[ \begin{array}{rr|rrrr} 4 \amp 86 \amp 15 \amp 0 \amp 290 \amp 0 \end{array}\right]^{\intercal}
\end{equation*}
resulting the objective of
\(610/7\text{.}\)