To rearrange any equation, you must always do the same to both sides.
If you take a number from one side, you must also take it from the other. If you divide a side by one number you must divide the other by the same number (and this applies to the whole of both sides, not just part of the side).
7x + a = 3x + b, make x the subject:
Begin by collecting like terms on each side (so all the terms involving x on one side, and all the other terms on the other side).