Write the dual for the following linear program:
max($3x_1 + 8x_2$)
subject to
$x_1 + 4x_2$ ≤ 20
$x_1 + x_2$ ≥ 7
$x_1$ ≥ -1
$x_1$ ≤ 5
The posted solution is as follows, but does not show the steps.

Where did I go wrong?
Write the dual for the following linear program:
max($3x_1 + 8x_2$)
subject to
$x_1 + 4x_2$ ≤ 20
$x_1 + x_2$ ≥ 7
$x_1$ ≥ -1
$x_1$ ≤ 5
The posted solution is as follows, but does not show the steps.

Where did I go wrong?
Check your definition of $z_1$ and $z_2$.
$$z_1 = x_1 + 1 \iff x_1 = z_1-1$$
$$z_2 = -x_2+5 \iff x_2 = -z_2+5$$
Hence $$x_1+4x_2 \le 20$$ becomes
$$(z_1-1)+4(-z_2+5) \le 20$$ which is equivalent to
$$z_1 -4z_2 \le 1.$$
Do the same thing for the second inequality.
If inequality is greater than you don’t multiply by $-1$, but add the constant. Note: $$x_1\ge -1 \Rightarrow \underbrace{x_1+1}_{z_1}\ge 0;\\ x_2\le 5\Rightarrow -x_2\ge -5 \Rightarrow \underbrace{-x_2+5}_{z_2}\ge 0.$$ Note that your conversion to dual is correct.