You need to isolate x by applying inverse functions to the right-hand side so as to get x by itself. Whatever you do to the RHS, you also have to do to the LHS of the equation.
y = mx + b opposite of +b is -b
y-b = mx opposite of multiplying by m is dividing by m or multiplying by 1/m
(y-b)/m = x done
Math teachers want you to write the in between steps like y-b = mx + b - b
Unfortunately, most students pile all the operations on top of each other and lose their way (especially with variables only)
Note that the operations performed to undo what's been done to x are the inverse operation in reverse order of operations. (Undo +/- , times/divide, power)
Please consider a tutor. Take care.