5x+2=10

Subtract 2 from both sides, then divide by 5.