5x-4-2x+1=8x+2

5x - 4 - 2x + 1 = 8x + 2

Combine terms on each side.

3x - 3 = 8x + 2

Subtract 3x and 2 from each side.

-5 = 5x

You should be able to do the next step.