$$ \begin{aligned} 12 &= 18-d&& \text{ swap the left and right side of the equation } \\[1 em]18-d &= 12&& \text{ move 18 to the right } \\[1 em]-d &= 12-18&& \\[1 em]-d &= -6&& \text{switch signs on both sides} \\[1 em]d &= 6&& \\[1 em] \end{aligned} $$