8x - 23 = -x + 18 is how I'm interpreting your query.
"the opposite of the number" is slightly confusing, so I'm assuming you mean a negative. If not, please let me know.
We can solve for x using this equation.
8x - 23 = 18 - x
<em><u>Add x to both sides</u></em>
9x - 23 = 18
<em><u>Add 23 to both sides</u></em>
9x = 41
<em><u>Divide both sides by 9</u></em>
x = 4.56