# Equations with the variable on both sides

When the variable is on both sides of the equal sign, we need to perform addition or subtraction to get the variable only on one side of the equal sign. Then the equation will look like ones we have solved in previous sections.

Let's work step-by-step through this example:       $4x + 5 = 2x - 3$

We have 4 x’s on one side of the equal sign and 2 x’s on the other side. To eliminate the x’s on the right side of the equal sign, we need to subtract the 2 x’s, but remember, what we do to one side of the equal sign, we must also do to the other side.

\begin{align} 4x + 5 &= 2x - 3 \\ 4x {\color{Red}- 2x} + 5 &= 2x {\color{Red}- 2x} - 3 \\ \end{align}

Combine like terms on each side of the equal sign.

\begin{align} {\color{Red}4x - 2x} + 5 &= {\color{Red}2x - 2x} - 3 \\ 2x + 5 &= -3 \\ \end{align}

Now, we have an equation similar to those that we have solved in past sections. To get the term with the x alone, we subtract 5 from both sides of the equal sign.

\begin{align} 2x + 5 &= -3 \\ 2x + 5 {\color{Red}- 5} &= -3 {\color{Red}- 5} \\ \end{align}

Combine like terms on each side of the equal sign.

\begin{align} 2x {\color{Red}+ 5 - 5} &= {\color{Red}-3 - 5} \\ 2x &= -8 \\ \end{align}

To get the x alone, undo the multiplication by 2 by dividing by 2.

\begin{align} 2x &= -8 \\ \frac{2x}{\color{Red}{2}} &= \frac{-8}{\color{Red}{2}} \\ x &= -4 \\ \end{align}

### Example 1:       $3a - 4 = -6a + 10$

In this example, we have the variable on both sides of the equal sign. We can either add 6a to both sides or subtract 3a from both sides of the equal sign in order to eliminate the variable from one side. Let's add 6a to both sides of the equal sign.

\begin{align} 3a - 4 &= -6a + 10 \\ 3a + 6a - 4 &= -6a + 6a + 10 \qquad \text{add 6a to both sides of the equal sign} \\ 9a - 4 &= 10 \qquad \text{combine like terms on both sides of the equal sign} \\ 9a - 4 + 4 &= 10 + 4 \qquad \text{to get the variable alone, add 4 to both sides} \\ 9a &= 14 \qquad \text{combine like terms on both sides of the equal sign} \\ a &= 14/9 \qquad \text{to solve for a, divide both sides by 9} \\ \end{align}

### Example 2:       $-7m -8 = 10m - 2$

For this problem, let's try subtracting 10m from both sides of the equal sign.

\begin{align} -7m -8 &= 10m - 2 \\ -7m -10m - 8 &= 10m - 10m - 2 \\ -17m - 8 &= -2 \\ -17m - 8 + 8 &= -2 + 8 \\ -17m &= 6 \\ m &= \frac{-6}{17} \\ \end{align}

### Continuing with example 2:       $-7m - 8 = 10m - 2$

Let's do the same problem by adding 7m to both sides of the equal sign.

\begin{align} -7m - 8 &= 10m - 2 \\ -7m + 7m -8 &= 10m + 7m - 2 \\ -8 &= 17m - 2 \\ -8 + 2 &= 17m -2 + 2 \\ -6 &= 17m \\ \frac{-6}{17} &= m \quad \text{or} \quad m = \frac{-6}{17} \\ \end{align}

Note that we get the same answer no matter if we begin by subtracting 10m from both sides or adding 7m to both sides.