First, distribute the 5 into the 8x-1 (5 times 8x, 5 times -1)
40x - 5 - x = 2x + 32
Subtract the x
39x - 5 = 2x + 32
Switch the sides for -5 (it will become positive and add to the 32)
39x = 2x + 37
Switch sides for the 2x (it will become negative and subtract from the 39x)
37x = 37
Divide both sides by 37
x = 1