Solución
\[
\textbf{Step 1. Convert inequalities to equalities by introducing slack variables.}
\]
Introduce slack variables \( x_3 \) and \( x_4 \) such that:
\[
\begin{aligned}
2x_1+5x_2+x_3 &= 9, \\
x_1+2x_2+x_4 &= 4, \\
x_1,x_2,x_3,x_4 &\ge 0.
\end{aligned}
\]
The objective function to maximize is:
\[
P = 4x_1+9x_2.
\]
\[
\textbf{Step 2. Set up the initial simplex tableau.}
\]
We form the tableau with basic variables \( x_3 \) and \( x_4 \):
\[
\begin{array}{c|cccc|c}
& x_1 & x_2 & x_3 & x_4 & \text{RHS} \\
\hline
\text{Row 1 (for \( x_3 \))} & 2 & 5 & 1 & 0 & 9 \\
\text{Row 2 (for \( x_4 \))} & 1 & 2 & 0 & 1 & 4 \\
\hline
\text{Row 0 (Objective)} & -4 & -9 & 0 & 0 & 0 \\
\end{array}
\]
\[
\textbf{Step 3. Identify the entering variable.}
\]
Examine the bottom row (Row 0). The most negative coefficient is \(-9\) corresponding to \( x_2 \). Therefore, \( x_2 \) enters the basis.
\[
\textbf{Step 4. Determine the leaving variable using the minimum ratio test.}
\]
Calculate the ratios for rows where the coefficient of \( x_2 \) is positive:
\[
\text{Row 1: } \frac{9}{5} = 1.8, \quad \text{Row 2: } \frac{4}{2} = 2.
\]
The smallest ratio is \( 1.8 \) from Row 1, so \( x_3 \) leaves and \( x_2 \) enters.
\[
\textbf{Step 5. Perform the pivot operation (pivot on the element in Row 1, Column \( x_2 \), which is 5).}
\]
\[
\textbf{i) Divide Row 1 by 5:}
\]
\[
\begin{aligned}
x_1:&\quad \frac{2}{5}, \\
x_2:&\quad 1, \\
x_3:&\quad \frac{1}{5}, \\
x_4:&\quad 0, \\
\text{RHS}:&\quad \frac{9}{5}.
\end{aligned}
\]
Thus, the new Row 1 becomes:
\[
\left(\frac{2}{5},\; 1,\; \frac{1}{5},\; 0,\; \frac{9}{5}\right).
\]
\[
\textbf{ii) Update Row 2 to eliminate \( x_2 \):}
\]
Subtract \( 2 \times \) (new Row 1) from Row 2:
\[
\begin{array}{rcl}
\text{Row 2: } (1,\, 2,\, 0,\, 1,\, 4) & - & 2\left(\frac{2}{5},\, 1,\, \frac{1}{5},\, 0,\, \frac{9}{5}\right) \\
& = & \left(1-\frac{4}{5},\, 2-2,\, 0-\frac{2}{5},\, 1-0,\, 4-\frac{18}{5}\right) \\
& = & \left(\frac{1}{5},\, 0,\, -\frac{2}{5},\, 1,\, \frac{2}{5}\right).
\end{array}
\]
\[
\textbf{iii) Update the objective function Row 0 to eliminate \( x_2 \):}
\]
Add \( 9 \times \) (new Row 1) to Row 0:
\[
\begin{array}{rcl}
\text{Row 0: } (-4,\, -9,\, 0,\, 0,\, 0) & + & 9\left(\frac{2}{5},\, 1,\; \frac{1}{5},\, 0,\, \frac{9}{5}\right) \\
& = & \left(-4+\frac{18}{5},\, -9+9,\; 0+\frac{9}{5},\, 0+0,\, 0+\frac{81}{5}\right) \\
& = & \left(-\frac{2}{5},\, 0,\, \frac{9}{5},\, 0,\, \frac{81}{5}\right).
\end{array}
\]
The updated tableau now is:
\[
\begin{array}{c|cccc|c}
& x_1 & x_2 & x_3 & x_4 & \text{RHS} \\
\hline
\text{Row 1: } x_2 & \frac{2}{5} & 1 & \frac{1}{5} & 0 & \frac{9}{5} \\
\text{Row 2: } x_4 & \frac{1}{5} & 0 & -\frac{2}{5} & 1 & \frac{2}{5} \\
\hline
\text{Row 0 (Objective)} & -\frac{2}{5} & 0 & \frac{9}{5} & 0 & \frac{81}{5} \\
\end{array}
\]
\[
\textbf{Step 6. Check for optimality.}
\]
The bottom row still has a negative coefficient (\(-\frac{2}{5}\) for \( x_1 \)). Thus, we select \( x_1 \) as the entering variable.
\[
\textbf{Step 7. Determine the leaving variable using the ratio test.}
\]
Consider the rows where the coefficient of \( x_1 \) is positive:
\[
\text{Row 1: } \frac{\frac{9}{5}}{\frac{2}{5}} = \frac{9}{2} = 4.5,\quad \text{Row 2: } \frac{\frac{2}{5}}{\frac{1}{5}} = 2.
\]
The smallest ratio is \( 2 \) from Row 2. Thus, \( x_4 \) leaves and \( x_1 \) enters.
\[
\textbf{Step 8. Pivot on the element in Row 2, Column \( x_1 \) (which is \(\frac{1}{5}\)).}
\]
\[
\textbf{i) Divide Row 2 by \(\frac{1}{5}\):}
\]
Multiply Row 2 by 5:
\[
\begin{aligned}
x_1: &\quad 1, \\
x_2: &\quad 0, \\
x_3: &\quad -2, \\
x_4: &\quad 5, \\
\text{RHS}: &\quad 2.
\end{aligned}
\]
Thus, new Row 2 becomes:
\[
(1,\; 0,\; -2,\; 5,\; 2).
\]
\[
\textbf{ii) Update Row 1 to eliminate \( x_1 \):}
\]
Row 1 has a coefficient of \(\frac{2}{5}\) for \( x_1 \). Subtract \(\frac{2}{5}\) times the new Row 2 from Row 1:
\[
\begin{array}{rcl}
\text{Row 1: } \left(\frac{2}{5},\, 1,\, \frac{1}{5},\, 0,\, \frac{9}{5}\right) & - & \frac{2}{5}\times (1,\, 0,\,-2,\, 5,\, 2) \\
& = & \left(\frac{2}{5}-\frac{2}{5},\, 1-0,\, \frac{1}{5}+\frac{4}{5},\, 0-2,\; \frac{9}{5}-\frac{4}{5}\right) \\
& = & \left(0,\; 1,\; 1,\; -2,\; 1\right).
\end{array}
\]
\[
\textbf{iii) Update the objective function Row 0 to eliminate \( x_1 \):}
\]
Row 0 has a coefficient of \(-\frac{2}{5}\) for \( x_1 \). Add \(\frac{2}{5}\) times the new Row 2 to Row 0:
\[
\begin{array}{rcl}
\text{Row 0: } \left(-\frac{2}{5},\, 0,\, \frac{9}{5},\, 0,\; \frac{81}{5}\right) & + & \frac{2}{5}\times (1,\, 0,\,-2,\, 5,\; 2) \\
& = & \left(-\frac{2}{5}+\frac{2}{5},\, 0+0,\, \frac{9}{5}-\frac{4}{5},\, 0+2,\; \frac{81}{5}+\frac{4}{5}\right) \\
& = & \left(0,\; 0,\; \frac{5}{5},\; 2,\; \frac{85}{5}\right) \\
& = & \left(0,\; 0,\; 1,\; 2,\; 17\right).
\end{array}
\]
The updated tableau becomes:
\[
\begin{array}{c|cccc|c}
& x_1 & x_2 & x_3 & x_4 & \text{RHS} \\
\hline
\text{Row 1: } x_2 & 0 & 1 & 1 & -2 & 1 \\
\text{Row 2: } x_1 & 1 & 0 & -2 & 5 & 2 \\
\hline
\text{Row 0 (Objective)} & 0 & 0 & 1 & 2 & 17 \\
\end{array}
\]
\[
\textbf{Step 9. Read the solution from the final tableau.}
\]
The basic variables are:
- \( x_2 \) (Row 1) with value \( 1 \),
- \( x_1 \) (Row 2) with value \( 2 \).
Nonbasic variables \( x_3 \) and \( x_4 \) are zero.
Thus, we have:
\[
x_1 = 2, \quad x_2 = 1, \quad P = 17.
\]
\[
x_{1} = 2 \quad \text{and} \quad P = 17.
\]