Maybe it's worthwhile to talk through where the dual comes from. This will take a while, but hopefully the dual won't seem so mysterious when we're done.
Suppose we want to use the primal's constraints as a way to find an upper bound on the optimal value of the primal. If we multiply the first constraint by $9$, the second constraint by $1$, and add them together, we get $9(2x_1 - x_2) + 1(x_1 +3 x_2)$ for the left-hand side and $9(1) + 1(9)$ for the right-hand side. Since the first constraint is an equality and the second is an inequality, this implies $$19x_1 - 6x_2 \leq 18.$$
But since $x_1 \geq 0$, it's also true that $5x_1 \leq 19x_1$, and so $$5x_1 - 6x_2 \leq 19x_1 - 6x_2 \leq 18.$$
Therefore, $18$ is an upper-bound on the optimal value of the primal problem.
Surely we can do better than that, though. Instead of just guessing $9$ and $1$ as the multipliers, let's let them be variables. Thus we're looking for multipliers $y_1$ and $y_2$ to force $$5x_1 - 6x_2 \leq y_1(2x_1-x_2) + y_2(x_1 + 3x_2) \leq y_1(1) + y_2(9).$$
Now, in order for this pair of inequalities to hold, what has to be true about $y_1$ and $y_2$? Let's take the two inequalities one at a time.
The first inequality: $5x_1 - 6x_2 \leq y_1(2x_1-x_2) + y_2(x_1 + 3x_2)$
We have to track the coefficients of the $x_1$ and $x_2$ variables separately. First, we need the total $x_1$ coefficient on the right-hand side to be at least $5$. Getting exactly $5$ would be great, but since $x_1 \geq 0$, anything larger than $5$ would also satisfy the inequality for $x_1$. Mathematically speaking, this means that we need $2y_1 + y_2 \geq 5$.
On the other hand, to ensure the inequality for the $x_2$ variable we need the total $x_2$ coefficient on the right-hand side to be exactly $-6$. Since $x_2$ could be positive, we can't go lower than $-6$, and since $x_2$ could be negative, we can't go higher than $-6$ (as the negative value for $x_2$ would flip the direction of the inequality). So for the first inequality to work for the $x_2$ variable, we've got to have $-y_1 + 3y_2 = -6$.
The second inequality: $y_1(2x_1-x_2) + y_2(x_1 + 3x_2) \leq y_1(1) + y_2(9)$
Here we have to track the $y_1$ and $y_2$ variables separately. The $y_1$ variables come from the first constraint, which is an equality constraint. It doesn't matter if $y_1$ is positive or negative, the equality constraint still holds. Thus $y_1$ is unrestricted in sign. However, the $y_2$ variable comes from the second constraint, which is a less-than-or-equal to constraint. If we were to multiply the second constraint by a negative number that would flip its direction and change it to a greater-than-or-equal constraint. To keep with our goal of upper-bounding the primal objective, we can't let that happen. So the $y_2$ variable can't be negative. Thus we must have $y_2 \geq 0$.
Finally, we want to make the right-hand side of the second inequality as small as possible, as we want the tightest upper-bound possible on the primal objective. So we want to minimize $y_1 + 9y_2$.
Putting all of these restrictions on $y_1$ and $y_2$ together we find that the problem of using the primal's constraints to find the best upper-bound on the optimal primal objective entails solving the following linear program:
$$\begin{align*}
\text{Minimize }\:\:\:\:\: y_1 + 9y_2& \\
\text{subject to }\:\:\:\:\: 2y_1 + y_2& \geq 5 \\
-y_1 + 3y_2& = -6\\
y_2 & \geq 0.
\end{align*}$$
And that's the dual.
It's probably worth summarizing the implications of this argument for all possible forms of the primal and dual. The following table is taken from p. 214 of
Introduction to Operations Research, 8th edition, by Hillier and Lieberman. They refer to this as the SOB method, where SOB stands for Sensible, Odd, or Bizarre, depending on how likely one would find that particular constraint or variable restriction in a maximization or minimization problem.
Primal Problem Dual Problem
(or Dual Problem) (or Primal Problem)
Maximization Minimization
Sensible <= constraint paired with nonnegative variable
Odd = constraint paired with unconstrained variable
Bizarre >= constraint paired with nonpositive variable
Sensible nonnegative variable paired with >= constraint
Odd unconstrained variable paired with = constraint
Bizarre nonpositive variable paired with <= constraint
- $[y_1, y_2]^T = [2,1]$ is not a feasible solution to the dual since it doesn't satisfy the first constraint $4y_1 -y_2 = 7 > -7$.
- $[y_1, y_2]^T = [2,1]$ is not a basic solution. You may say "by the same calculations", but not "by the same arguments".
\begin{align}
4y_1 -y_2 = 7 > -7 &\implies [y_1, y_2]^T \text{ infeasible} \\
4y_1 -y_2 = 7 \ne -7 &\implies [y_1, y_2]^T \text{ non-basic}
\end{align}
The second implication follows since we actually transform the LP into
\begin{array}{lrr}
\text{max} & w = -22y_1 -8y_2 &\\
\text{s.t.} & -2y_1 - y_2 +s_1 =& -4 \\
& 4y_1 -y_2 +s_2 =& -7\\
&-y_1 -3y_2 +s_3 =& 5\\
&8y_1 -y_2 +s_4 =& -14\\
& y_1, y_2, s_1, s_2, s_3, s_4 \geq 0
\end{array}
The calculations in the question body actually shows that $s_i$'s are nonzero, so the solution $[y_1,y_2]^T$ has more than two nonzero components, so it's not a basic solution.
- You have the right choice of method. To use the dual simplex method, we need a basic (infeasible) solution with the optimality satisfied. Note that feasibility and optimality are two independent concepts. It's easy to observe that in the simplex tableau, the $w$-row ($[22, 8, 0,\dots,0]$) is nonnegative, so the optimality condition is satisfied. As a result, the most obvious choice for a basic variable would be $[y_1,y_2]^T=[0,0]$.
Before continuing the dual simplex method, in response to OP's comment corcerning $[y_1,y_2]^T = [2, -1]$, we have $s_1 = -4 + 2(2) + (-1) = -1 \ne 0$, so $[y_1,y_2]^T = [2,-1]$ has more than two nonzero components, so it's nonbasic and infeasible. We can't use this to solve the dual.
Current basis: $s_1, s_2, s_3, s_4$
\begin{array}{rrrrrrr|r}
& y_1 & y_2 & s_1 & s_2 & s_3 & s_4 & \\ \hline
s_1 & -2 & -1 & 1 & 0 & 0 & 0 & -4 \\
s_2 & 4 & -1 & 0 & 1 & 0 & 0 & -7 \\
s_3 & -1 & -3 & 0 & 0 & 1 & 0 & 5 \\
s_4 & 8 & -1 & 0 & 0 & 0 & 1 & -14 \\ \hline
& 22 & 8 & 0 & 0 & 0 & 0 & 0 \\
\text{ratio} & 11/4 & -8 & & & & 0 &
\end{array}
Leaving variable: $s_4$, entering variable: $y_2$
Current basis: $s_1, s_2, s_3, y_2$
\begin{array}{rrrrrrr|r}
& y_1 & y_2 & s_1 & s_2 & s_3 & s_4 & \\ \hline
s_1 & -10 & 0 & 1 & 0 & 0 & -1 & 10 \\
s_2 & -4 & 0 & 0 & 1 & 0 & -1 & 7 \\
s_3 & -25 & 0 & 0 & 0 & 1 & -3 & 47 \\
y_2 & -8 & 1 & 0 & 0 & 0 & -1 & 14 \\ \hline
& \color{blue}{86} & \color{blue}{0} & \color{red}{0} & \color{red}{0} & \color{red}{0} & \color{red}{\bbox[2px, border: solid 1px]{8}} & -112 \\
\end{array}
Hence the optimal solution is $[y_1,y_2]^T = [0,14]$ with $w = -112$.
By adding slack variabes $t_1,t_2$ to the primal
\begin{array}{rlr}
\min z = & \color{red}{-4x_1 - 7x_2 + 5x_3 -14x_4} &\\
\text{s.t.} & 2x_1 -4x_2 + x_3 -8x_4 +\color{blue}{t_1} &= 22 \\
& x_1 + x_2 + 3x_3 + x_4 +\color{blue}{t_2} &= 8 \\
& \color{red}{x_1, x_2, x_3, \bbox[2px, border: solid 1px]{x_4}}, \color{blue}{t_1,t_2} \geq 0,
\end{array}
we can read the solution of the primal from the simplex tableau for the dual: the optimal solution for the primal is $[\color{red}{x_1, x_2, x_3, \bbox[2px, border: solid 1px]{x_4}}, \color{blue}{t_1,t_2}]^T = [\color{red}{0,0,0, \bbox[2px, border: solid 1px]{8}}, \color{blue}{86,0}]$.
Best Answer
He probably used the complementary slackness theorem. For this purpose I write the condition constraints with slack variables and therefore equalities.
$$ \begin{matrix}\min & C = 3x_1 + 9x_2 \\ s.t: \\ & 2x_1 + x_2 -s_1= 8 \\ & x_1 + 2x_2 -s_2= 8 \\ &x_1, x_2 \ge 0 \end{matrix}$$
$$\begin{matrix}\max & P = 8y_1 + 8y_2 \\ s.t: \\ & 2y_1 + y_2 +z_1= 3 \\ & y_1 + 2y_2 +z_2= 9 \end{matrix} $$
The complementary slackness theorem states:
$x_j^*\cdot z_j=0 \ \forall \ \ j=1,2, \ldots , n$
$y_i^*\cdot s_i=0 \ \forall \ \ i=1,2, \ldots , m$
$s_i \text{ are the slack variables of the primal problem.}$
$z_j \text{ are the slack variabales of the dual problem.}$
From the dual optimal solution we know that $y_2^*=3$. That means that $3\cdot s_2=0\Rightarrow s_2=0$. That again means the second constraint of the primal is
$$x_1+2x_2=8\quad (1)$$
And last but not least we know that the optimal primal value is equal to the optimal dual value (strong duality theorem). That means that $8\cdot y_1^*+8\cdot 0=y_1^*+8\cdot 3=24$. Therefore the equation for the optimal value of the primal is
$$3x_1 + 9x_2=24 \quad (2)$$
$$x_1 + 3x_2=8\quad (2a)$$
The solution follows straightforward if you subtract $(1)$ from $(2a)$. If you are more familiar with this theorems it is not very time-consuming. In this case more or less two minutes, I guess.