First, combine the like terms on the left side of the equation:
#-5color(red)(x) + 40color(red)(x) + 8 = -27#
#(-5 + 40)color(red)(x) + 8 = -27#
#35color(red)(x) + 8 = -27#
Next, subtract #color(red)(8)# from each side of the equation to isolate the #x# term while keeping the equation balanced:
#35x + 8 - color(red)(8) = -27 - color(red)(8)#
#35x + 0 = -35#
#35x = -35#
Now, divide each side of the equation by #color(red)(35)# to solve for #x# while keeping the equation balanced:
#(35x)/color(red)(35) = -35/color(red)(35)#
#(color(red)(cancel(color(black)(35)))x)/cancel(color(red)(35)) = -1#
#x = -1#