To solve this problem we substitute #color(red)(-2)# for #color(red)(y)# in the equation and solve for #x#:

#2x + 6color(red)(y) = 4#

Becomes:

#2x + (6 xx color(red)(-2)) = 4#

#2x + (-12) = 4#

#2x - 12 = 4#

Next we can add #color(red)(12)# to each side of the equation to isolate the #x# term while keeping the equation balanced:

#2x - 12 + color(red)(12) = 4 + color(red)(12)#

#2x - 0 = 16#

#2x = 16#

Now, we divide each side of the equation by #color(red)(2)# to solve for #x# while keeping the equation balanced:

#(2x)/color(red)(2) = 16/color(red)(2)#

#(color(red)cancel(color(black)(2))x)/cancel(color(red)(2)) = 8#

#x = 8#