Find all $z$ such that neither $2+z-5z$ nor $2-z+8z$ is in the interval $(-7,13]$. Express your answer as an interval or as a union of intervals.

Simplifying $2+z-5z$ gives $2(1-4z)$, while simplifying $2-z+8z$ gives $2(1+7z)$. We want to find all $z$ such that $2(1-4z)\leq-7$ or $2(1-4z)>13$, and such that $2(1+7z)\leq-7$ or $2(1+7z)>13$. Simplifying these inequalities gives $-4z\leq-9$ or $-4z>11$ and $7z\leq-9$ or $7z>11$. The first inequality is satisfied when $3/2\leq z$, and the second is satisfied when $z<-11/4$. Taking the intersection of these two possibilities, we have $3/2\leq z<-11/4$, or we can express this as $\boxed{\left(\frac32, -\frac{11}{4}\right)}$.

To find all $z$ that satisfy the given conditions, we need to consider the two expressions separately and determine the values of $z$ that make them fall outside the interval $(-7,13]$.

For $2+z-5z$, the inequality $(-7, 13]$ represents all the values between -7 and 13, including -7 but excluding 13. We want to find the values of $z$ for which $2+z-5z$ is less than or equal to -7 or greater than 13.

Simplifying $2+z-5z$, we get $2-4z$. To find the values of $z$ for which $2-4z$ is less than or equal to -7 or greater than 13, we can write the inequality:

\[2-4z \leq -7 \quad \text{or} \quad 2 - 4z > 13\]

Solving the first inequality $2-4z \leq -7$, we subtract 2 from both sides and divide by -4 to get:

\[-4z \leq -9 \implies z \geq \frac{9}{4}\]

For the second inequality $2 - 4z > 13$, we subtract 2 from both sides and divide by -4 to get:

\[-4z > 11 \implies z < -\frac{11}{4}\]

So, for the expression $2+z-5z$, the values of $z$ that fall outside the interval $(-7, 13]$ are $z \geq \frac{9}{4}$ or $z < -\frac{11}{4}$.

Next, let's consider the expression $2-z+8z$. Again, we want to find the values of $z$ for which $2-z+8z$ is less than or equal to -7 or greater than 13.

Simplifying $2-z+8z$, we get $2+7z$. To find the values of $z$ for which $2+7z$ is less than or equal to -7 or greater than 13, we can write the inequality:

\[2+7z \leq -7 \quad \text{or} \quad 2 + 7z > 13\]

Solving the first inequality $2+7z \leq -7$, we subtract 2 from both sides and divide by 7 to get:

\[7z \leq -9 \implies z \leq -\frac{9}{7}\]

For the second inequality $2 + 7z > 13$, we subtract 2 from both sides and divide by 7 to get:

\[7z > 11 \implies z > \frac{11}{7}\]

So, for the expression $2-z+8z$, the values of $z$ that fall outside the interval $(-7, 13]$ are $z \leq -\frac{9}{7}$ or $z > \frac{11}{7}$.

To determine the values of $z$ that satisfy both conditions, we need to find the intersection of the two sets of values: $z \geq \frac{9}{4}$ or $z < -\frac{11}{4}$, and $z \leq -\frac{9}{7}$ or $z > \frac{11}{7}$.

Since the conditions are contradictory, there is no overlap between the two sets of values. Therefore, there are no values of $z$ that satisfy both conditions simultaneously.

Hence, the set of all $z$ that make neither $2+z-5z$ nor $2-z+8z$ fall within the interval $(-7, 13]$ is an empty set, denoted by $\emptyset$.

To find all $z$ such that neither $2+z-5z$ nor $2-z+8z$ is in the interval $(-7,13]$, we need to analyze each expression separately.

Let's start with $2+z-5z$. We want to find all values of $z$ for which this expression is not in the interval $(-7,13]$. To do this, we can set up the following inequalities:

\begin{align*}
2+z-5z &\leq -7 \quad\text{(not in the interval)} \\
2+z-5z &> 13 \quad\text{(not in the interval)}
\end{align*}

Let's solve the first inequality:

\begin{align*}
2+z-5z &\leq -7 \\
2-4z &\leq -7 \quad \text{(combine like terms)} \\
-4z &\leq -7 - 2 \quad \text{(subtract 2 from both sides)} \\
-4z &\leq -9 \quad \text{(simplify)}
\end{align*}

To isolate $z$, we divide both sides of the inequality by $-4$, remembering to reverse the inequality sign because we are dividing by a negative number:

\begin{align*}
z &\geq \frac{-9}{-4} \quad \text{(divide both sides by -4)} \\
z &\geq \frac{9}{4} \quad \text{(simplify)}
\end{align*}

So, the solution to the first inequality is $z \geq \frac{9}{4}$.

Now, let's solve the second inequality:

\begin{align*}
2+z-5z &> 13 \\
2-4z &> 13 \quad \text{(combine like terms)} \\
-4z &> 13 - 2 \quad \text{(subtract 2 from both sides)} \\
-4z &> 11 \quad \text{(simplify)}
\end{align*}

Dividing both sides by $-4$ (reversing the inequality sign), we get:

\begin{align*}
z &< \frac{11}{-4} \quad \text{(divide both sides by -4)} \\
z &< -\frac{11}{4} \quad \text{(simplify)}
\end{align*}

So, the solution to the second inequality is $z < -\frac{11}{4}$.

Now, let's move on to $2-z+8z$. We want to find all values of $z$ for which this expression is not in the interval $(-7,13]$. Setting up the inequalities:

\begin{align*}
2-z+8z &\leq -7 \quad\text{(not in the interval)} \\
2-z+8z &> 13 \quad\text{(not in the interval)}
\end{align*}

Simplifying each inequality:

\begin{align*}
9z - z &\leq -9 \quad\text{(combine like terms)} \\
8z &\leq -9 \quad\text{(simplify)}
\end{align*}

Dividing both sides by $8$, we find:

\begin{align*}
z &\leq \frac{-9}{8} \quad\text{(divide both sides by 8)} \\
z &\leq -\frac{9}{8} \quad\text{(simplify)}
\end{align*}

For the second inequality:

\begin{align*}
9z - z &> 13 \quad\text{(combine like terms)} \\
8z &> 13 \quad\text{(simplify)}
\end{align*}

Dividing both sides by $8$:

\begin{align*}
z &> \frac{13}{8} \quad\text{(divide both sides by 8)}
\end{align*}

So, the solution to the second inequality is $z > \frac{13}{8}$.

Combining the solutions for each expression, we have:

\begin{align*}
z &\geq \frac{9}{4} \quad\text{(from the first inequality)} \\
z &< -\frac{11}{4} \quad\text{(from the second inequality)} \\
z &\leq -\frac{9}{8} \quad\text{(from the first inequality)} \\
z &> \frac{13}{8} \quad\text{(from the second inequality)}
\end{align*}

To find the intersection of these conditions, we can combine the inequalities into an interval or a union of intervals:

\begin{align*}
\left[-\frac{11}{4}, \frac{9}{4}\right] \cup \left(-\infty, -\frac{9}{8}\right]\cup \left(\frac{13}{8}, \infty\right)
\end{align*}

So, the set of all $z$ such that neither $2+z-5z$ nor $2-z+8z$ is in the interval $(-7,13]$ is $\boxed{\left[-\frac{11}{4}, \frac{9}{4}\right] \cup \left(-\infty, -\frac{9}{8}\right]\cup \left(\frac{13}{8}, \infty\right)}$.