Step 1) Solve the first equation for #y#:
#-x + 2y = 6#
#-x + color(red)(x) + 2y = 6 + color(red)(x)#
#0 + 2y = 6 - x#
#2y = 6 - x#
#(2y)/color(red)(2) = (6 - x)/color(red)(2)#
#(color(red)(cancel(color(black)(2)))y)/cancel(color(red)(2)) = 6/2 - x/2#
#y = 3 - x/2#
Step 2) Substitute #3 - x/2# for #y# in the second equation and solve for #x#:
#6(3 - x/2) = x + 18#
#18 - (6x)/2 = x + 18#
#18 - 3x = x + 18#
#18 - 3x + color(red)(3x) - color(blue)(18) = x + 18 + color(red)(3x) - color(blue)(18)#
#18 - color(blue)(18) - 3x + color(red)(3x) = x + color(red)(3x) + 18 - color(blue)(18)#
#0 - 0 = 4x + 0#
#0 = 4x#
#0/color(red)(4) = (4x)/color(red)(4)#
#0 = (color(red)(cancel(color(black)(4)))x)/cancel(color(red)(4))#
#0 = x#
#x = 0#