Don’t know if there’s much of an equation for it, but I guess the best way to write it out is 10 + x = -18. Then, you would subtract the 10 from both sides in order to isolate the x. So then you’re left with x = -28. So -28 is your answer.
Both are correct. Either rule applied first will have the same result. Both rules will be used either way, and the order in which they are applied does not matter as long as they are applied correctly at each step.