I want to see if I solved a problem correctly

The problem gives us two expressions:
[tex]\begin{gathered} y=9x-18 \\ y=18x \end{gathered}[/tex]And we need to solve for x. For that, the first step is to replace "y" on the first expression by the right side of the second expression:
[tex]18x=9x-18[/tex]Now we need to isolate the "x" variable on the left side:
[tex]\begin{gathered} 18x-9x=-18 \\ 9x=-18 \\ \frac{9x}{9}=\frac{-18}{9} \\ x=-2 \end{gathered}[/tex]We can now find "y" by replacing the value of "x" on the second expression:
[tex]y=18\cdot(-2)=-36[/tex]The value of x is equal to -2, and the value of y is equal to -36.