Solving Equations with Variables on Both Sides

Up until now, the equations you've solved have had the variable on one side and constants on the other. What happens when you see something like \(5x + 3 = 2x + 12\), with the variable on both sides? Not much, actually: it just takes one extra step. Move all the variable terms to one side and all the constants to the other, then solve as usual.

The Basic Idea

Think of the equation as a sorting game: collect all the \(x\) terms on one side and all the constants on the other. You can move terms in either direction, whichever makes the arithmetic cleaner, as long as you obey the golden rule: whatever you do to one side, you must do to the other.

Here's a first example.

Example: Solve \(5x + 3 = 2x + 12\).

There's \(5x\) on the left and \(2x\) on the right. Move the \(2x\) over to the left side by subtracting \(2x\) from both sides.

$$5x + 3 - 2x = 2x + 12 - 2x$$ $$3x + 3 = 12$$

Now the variable is only on the left side. From here, can you finish solving? Show answerSubtract 3: \(3x = 9\). Divide by 3: \(x = 3\). Check: \(5(3)+3=18\) and \(2(3)+12=18\). ✓

Choosing Which Side for the Variable

You can move the variable terms to either side. Sometimes one choice leads to easier numbers than the other.

Example: Solve \(7x - 4 = 3x + 8\).

Option 1: Move \(3x\) to the left (subtract \(3x\) from both sides). $$7x - 4 - 3x = 3x + 8 - 3x$$ $$4x - 4 = 8$$ $$4x = 12$$ $$x = 3$$

Option 2: Move \(7x\) to the right (subtract \(7x\) from both sides). $$7x - 4 - 7x = 3x + 8 - 7x$$ $$-4 = -4x + 8$$ $$-12 = -4x$$ $$x = 3$$

Both approaches work, and both give \(x = 3\). Option 1 is a bit cleaner because the coefficients stay positive. In general, moving the smaller variable term to the other side keeps the larger coefficient (and the positive sign) where it is, which usually saves you from negative-coefficient bookkeeping.

Equations That Need Simplification First

Sometimes you need to simplify one or both sides before you can start moving terms around.

Example: Solve \(4x + 2x - 5 = 3x + 7\).

First, combine the like terms on the left side: $$6x - 5 = 3x + 7$$

Now subtract \(3x\) from both sides: $$3x - 5 = 7$$

Add 5 to both sides: $$3x = 12$$

Divide by 3: $$x = 4$$

Check: Left side: \(4(4) + 2(4) - 5 = 16 + 8 - 5 = 19\). Right side: \(3(4) + 7 = 12 + 7 = 19\). ✓

Using the Distributive Property

If there are parentheses on one or both sides, distribute first.

Example: Solve \(3(x + 4) = 2x + 18\).

Distribute the 3 on the left: $$3x + 12 = 2x + 18$$

Subtract \(2x\) from both sides: $$x + 12 = 18$$

Subtract 12: $$x = 6$$

Check: \(3(6 + 4) = 3(10) = 30\) and \(2(6) + 18 = 12 + 18 = 30\). ✓

Example: Solve \(5(y - 2) = 3(y + 4)\).

This one has parentheses on both sides. Distribute first on each side.

Left side: \(5(y - 2) = 5y - 10\)

Right side: \(3(y + 4) = 3y + 12\)

The equation becomes: $$5y - 10 = 3y + 12$$

Subtract \(3y\) from both sides: $$2y - 10 = 12$$

Add 10: $$2y = 22$$

Divide by 2: $$y = 11$$

Check: \(5(11 - 2) = 5(9) = 45\) and \(3(11 + 4) = 3(15) = 45\). ✓

When the Answer is a Fraction or Decimal

Not every answer will be a whole number.

Example: Solve \(3x + 5 = x + 9\).

Subtract \(x\) from both sides: $$2x + 5 = 9$$

Subtract 5: $$2x = 4$$

Divide by 2: $$x = 2$$

That one worked out nicely. But what about this one?

Example: Solve \(4x + 7 = x + 13\).

Subtract \(x\): $$3x + 7 = 13$$

Subtract 7: $$3x = 6$$

Divide by 3: $$x = 2$$

Still a whole number. One more for good measure.

Example: Solve \(5x + 2 = 2x + 11\).

Subtract \(2x\): $$3x + 2 = 11$$

Subtract 2: $$3x = 9$$

Divide by 3: $$x = 3$$

Here's one that actually produces a fraction.

Example: Solve \(3x + 4 = x + 7\).

Subtract \(x\): $$2x + 4 = 7$$

Subtract 4: $$2x = 3$$

Divide by 2: $$x = \frac{3}{2}$$

That's the exact answer. You could also write it as 1.5 if you prefer decimals, or as the mixed number \(1\frac{1}{2}\).

Negative Coefficients

When the variable's coefficient ends up negative, the process is the same — divide by the negative coefficient as the last step.

Example: Solve \(2x - 8 = 5x + 4\).

Subtract \(5x\) from both sides: $$2x - 8 - 5x = 5x + 4 - 5x$$ $$-3x - 8 = 4$$

Add 8: $$-3x = 12$$

Divide by -3: $$x = -4$$

When you divide a positive by a negative, you get a negative.

Check: \(2(-4) - 8 = -8 - 8 = -16\) and \(5(-4) + 4 = -20 + 4 = -16\). ✓

Try These Yourself

  1. \(6x + 5 = 2x + 17\) Show answerSubtract \(2x\): \(4x + 5 = 17\), subtract 5: \(4x = 12\), divide by 4: \(x = 3\)
  2. \(9y - 3 = 5y + 13\) Show answerSubtract \(5y\): \(4y - 3 = 13\), add 3: \(4y = 16\), divide by 4: \(y = 4\)
  3. \(3(m + 2) = m + 14\) Show answerDistribute: \(3m + 6 = m + 14\), subtract \(m\): \(2m + 6 = 14\), subtract 6: \(2m = 8\), divide by 2: \(m = 4\)
  4. \(4a - 7 = a + 8\) Show answerSubtract \(a\): \(3a - 7 = 8\), add 7: \(3a = 15\), divide by 3: \(a = 5\)
  5. \(2(p - 3) = 4(p + 1)\) Show answerDistribute: \(2p - 6 = 4p + 4\), subtract \(2p\): \(-6 = 2p + 4\), subtract 4: \(-10 = 2p\), divide by 2: \(p = -5\)
  6. \(7x + 4 = 3x + 20\) Show answerSubtract \(3x\): \(4x + 4 = 20\), subtract 4: \(4x = 16\), divide by 4: \(x = 4\)

What's Next?

A few habits worth building as you practice. Subtracting a variable term means taking it away, not adding it: \(5x - 2x = 3x\), not \(7x\). When variables are on both sides, sign errors are easier to make than ever, so keep close track of whether each move is adding or subtracting. Simplify each side first if you can: collapsing \(3x + 2x\) into \(5x\) before moving anything saves a step. And don't stop one step early — \(3x = 12\) is progress, but the answer is \(x = 4\). Finally, substitute your answer back into the original equation to confirm both sides match.

The same techniques carry forward into solving literal equations (rearranging formulas for a particular variable) and systems of equations, where you'll solve two equations at once. The mechanics stay the same; the bookkeeping just gets more involved.