Let's solve the equation step by step:
The equation is:
\[ 98 - ((45 + z) - 38) = 42 \]
Simplify the equation inside the parentheses:
\[ (45 + z) - 38 = 45 + z - 38 = z + 7 \]
Substitute back into the equation:
\[ 98 - (z + 7) = 42 \]
Now, distribute the negative sign:
\[ 98 - z - 7 = 42 \]
Combine like terms:
\[ 91 - z = 42 \]
To isolate \( z \), subtract 91 from both sides:
\[ -z = 42 - 91 \] \[ -z = -49 \]
Multiply by -1 to solve for \( z \):
\[ z = 49 \]
So, the solution is:
\[ z = 49 \]