$$ \begin{aligned} 42 &= 16x-9x&& \text{simplify right side} \\[1 em]42 &= 7x&& \text{ swap the left and right side of the equation } \\[1 em]7x &= 42&& \text{ divide both sides by $ 7 $ } \\[1 em]x &= \frac{42}{7}&& \\[1 em]x &= 6&& \\[1 em] \end{aligned} $$