To write the dual , if Z is maximization type, all the constraint must be less or equal to type ,first constraint is greater than equal to type , so multiply it by (-1) i.e. $-x_1 +2 x_2 - x_3 ≤ - 4$

Also $x_2$ is unrestricted , we write $x_2 =x_2'-x_2''$.

Third constraint is of equality form that we write in inequality form as

$x_1 +x_2 + 3x_3 ≤20$ & $x_1 +x_2 + 3x_3 ≥20$

Therefore above L.P.P can be written as
$Max. Z = 2x_1 –(x_2'-x_2'') + 3x_3$

Subject to , $-x_1 +2(x_2'-x_2'') - x_3 ≤ - 4 $

$2 x_1 + 0(x_2'-x_2'') + x_3 ≤10$

$x_1 + (x_2'-x_2'')+ 3x_3 ≤20 $

$-x1 - (x_2'-x_2'') - 3x_3 ≤-20 $

$x_1 , x_2' ,x_2'' , x3 ≥ 0$

Dual of the L.P.P can be written as:

$Min. w = - 4y_1 +10y_2 +20y_3' – 20y_3''$

Subject to $– y_1 + 2y_2 +y_3' –y_3''≥ 2$

$2y_1 + 0y_2 +y_3' – y_3''≥ - 1$

$-2 y1 - 0y2 –y_3'+y_3'' ≥ 1$

$- y_1 + y_2 + 3y_3' -3 y_3''≥3$

$y_1, y_2 , y_3' , y_3'' ≥ 0$