To isolate the variable x, 34 must be subtracted from both sides of the equation and it will look like this now:
x+34-34=40-34
This eliminates 34 from the right side of the equation. All that's left to do is combine like terms:
x=40-34
x=6
Hope this helped!