Skip to content
Solve Equations with Variables and Constants on Both Sides

Solve Equations with Variables and Constants on Both Sides

By the end of this section, you will be able to: solve an equation with constants on both sides, solve an equation with variables on both sides, solve an equation with variables and constants on both sides, and solve equations using a general strategy.

Solve an equation with constants on both sides

You may have noticed that in all the equations we have solved so far, all the variable terms were on only one side of the equation with the constants on the other side. This does not happen all the time — so now we’ll see how to solve equations where the variable terms and/or constant terms are on both sides of the equation.

Our strategy will involve choosing one side of the equation to be the variable side, and the other side of the equation to be the constant side. Then, we will use the Subtraction and Addition Properties of Equality, step by step, to get all the variable terms together on one side of the equation and the constant terms together on the other side.

By doing this, we will transform the equation that started with variables and constants on both sides into the form ax=bax = b. We already know how to solve equations of this form by using the Division or Multiplication Properties of Equality.

Example. Solve: 4x+6=144x + 6 = -14.

In this equation, the variable is only on the left side. It makes sense to call the left side the variable side. Therefore, the right side will be the constant side.

Since the left side is the variable side, the 66 is out of place. We must “undo” adding 66 by subtracting 66 from both sides:

4x+66=1464x + 6 - 6 = -14 - 6

Simplify:

4x=204x = -20

Now all the xsx\text{s} are on the left and the constant is on the right. Use the Division Property of Equality to divide both sides by 44:

4x4=204\tfrac{4x}{4} = \tfrac{-20}{4}

Simplify:

x=5x = -5

Check: substitute x=5x = -5 into 4x+6=144x + 6 = -14:

4(5)+6=?1420+6=?1414=144(-5) + 6 \stackrel{?}{=} -14 \qquad -20 + 6 \stackrel{?}{=} -14 \qquad -14 = -14 \checkmark

Solve: 3x+4=83x + 4 = -8.

Solve: 5a+3=375a + 3 = -37.

Solve an equation with variables on both sides

What if there are variables on both sides of the equation? We will start like we did above — choosing a variable side and a constant side, and then use the Subtraction and Addition Properties of Equality to collect all variables on one side and all constants on the other side. Remember, what you do to the left side of the equation, you must do to the right side too.

Example. Solve: 5x=4x+75x = 4x + 7.

Here the variable, xx, is on both sides, but the constants appear only on the right side, so let’s make the right side the “constant” side. Then the left side will be the “variable” side.

We don’t want any variables on the right, so subtract 4x4x from both sides:

5x4x=4x4x+75x - 4x = 4x - 4x + 7

Simplify:

x=7x = 7

We have all the variables on one side and the constants on the other. We have solved the equation.

Check: substitute 77 for xx into 5x=4x+75x = 4x + 7:

5(7)=?4(7)+735=?28+735=355(7) \stackrel{?}{=} 4(7) + 7 \qquad 35 \stackrel{?}{=} 28 + 7 \qquad 35 = 35 \checkmark

Solve: 6n=5n+106n = 5n + 10.

Sometimes the constant is on the left side and the variable on the right, or the coefficients pull the variable toward one side more naturally.

Example. Solve: 5y8=7y5y - 8 = 7y.

The only constant, 8-8, is on the left side of the equation and the variable, yy, is on both sides. Let’s leave the constant on the left and collect the variables to the right.

Subtract 5y5y from both sides:

5y5y8=7y5y5y - 5y - 8 = 7y - 5y

Simplify:

8=2y-8 = 2y

We have the variables on the right and the constants on the left. Divide both sides by 22:

82=2y2\tfrac{-8}{2} = \tfrac{2y}{2}

Simplify:

4=y-4 = y

Rewrite with the variable on the left:

y=4y = -4

Check: substitute y=4y = -4 into 5y8=7y5y - 8 = 7y:

5(4)8=?7(4)208=?2828=285(-4) - 8 \stackrel{?}{=} 7(-4) \qquad -20 - 8 \stackrel{?}{=} -28 \qquad -28 = -28 \checkmark

Solve: 3p14=5p3p - 14 = 5p.

Example. Solve: 7x=x+247x = -x + 24.

The only constant, 2424, is on the right, so let the left side be the variable side.

Remove the x-x from the right side by adding xx to both sides:

7x+x=x+x+247x + x = -x + x + 24

Simplify:

8x=248x = 24

All the variables are on the left and the constants are on the right. Divide both sides by 88:

8x8=248\tfrac{8x}{8} = \tfrac{24}{8}

Simplify:

x=3x = 3

Check: substitute x=3x = 3 into 7x=x+247x = -x + 24:

7(3)=?(3)+2421=217(3) \stackrel{?}{=} -(3) + 24 \qquad 21 = 21 \checkmark

Solve: 12j=4j+3212j = -4j + 32.

Solve equations with variables and constants on both sides

The next examples are the first to have variables and constants on both sides of the equation. As we did before, we’ll collect the variable terms to one side and the constants to the other side.

Example. Solve: 7x+5=6x+27x + 5 = 6x + 2.

Start by choosing which side will be the variable side and which side will be the constant side. The variable terms are 7x7x and 6x6x. Since 77 is greater than 66, make the left side the variable side and so the right side will be the constant side.

Collect the variable terms to the left side by subtracting 6x6x from both sides:

7x6x+5=6x6x+27x - 6x + 5 = 6x - 6x + 2

Simplify:

x+5=2x + 5 = 2

Now, collect the constants to the right side by subtracting 55 from both sides:

x+55=25x + 5 - 5 = 2 - 5

Simplify:

x=3x = -3

Check: substitute x=3x = -3 into 7x+5=6x+27x + 5 = 6x + 2:

7(3)+5=?6(3)+221+5=?18+216=167(-3) + 5 \stackrel{?}{=} 6(-3) + 2 \qquad -21 + 5 \stackrel{?}{=} -18 + 2 \qquad -16 = -16 \checkmark

Solve an equation with variables and constants on both sides.

  1. Choose one side to be the variable side and then the other will be the constant side.
  2. Collect the variable terms to the variable side, using the Addition or Subtraction Property of Equality.
  3. Collect the constants to the other side, using the Addition or Subtraction Property of Equality.
  4. Make the coefficient of the variable 11, using the Multiplication or Division Property of Equality.
  5. Check the solution by substituting it into the original equation.

It is a good idea to make the variable side the one in which the variable has the larger coefficient. This usually makes the arithmetic easier.

Example. Solve: 6n2=3n+76n - 2 = -3n + 7.

We have 6n6n on the left and 3n-3n on the right. Since 6>36 > -3, make the left side the “variable” side.

We don’t want variables on the right side — add 3n3n to both sides to leave only constants on the right:

6n+3n2=3n+3n+76n + 3n - 2 = -3n + 3n + 7

Combine like terms:

9n2=79n - 2 = 7

We don’t want any constants on the left side, so add 22 to both sides:

9n2+2=7+29n - 2 + 2 = 7 + 2

Simplify:

9n=99n = 9

The variable term is on the left and the constant term is on the right. To get the coefficient of nn to be one, divide both sides by 99:

9n9=99\tfrac{9n}{9} = \tfrac{9}{9}

Simplify:

n=1n = 1

Check: substitute 11 for nn into 6n2=3n+76n - 2 = -3n + 7:

6(1)2=?3(1)+74=46(1) - 2 \stackrel{?}{=} -3(1) + 7 \qquad 4 = 4 \checkmark

Solve: 8q5=4q+78q - 5 = -4q + 7.

Solve: 7n3=n+37n - 3 = n + 3.

Example. Solve: 2a7=5a+82a - 7 = 5a + 8.

This equation has 2a2a on the left and 5a5a on the right. Since 5>25 > 2, make the right side the variable side and the left side the constant side.

Subtract 2a2a from both sides to remove the variable term from the left:

2a2a7=5a2a+82a - 2a - 7 = 5a - 2a + 8

Combine like terms:

7=3a+8-7 = 3a + 8

Subtract 88 from both sides to remove the constant from the right:

78=3a+88-7 - 8 = 3a + 8 - 8

Simplify:

15=3a-15 = 3a

Divide both sides by 33 to make 11 the coefficient of aa:

153=3a3\tfrac{-15}{3} = \tfrac{3a}{3}

Simplify:

5=a-5 = a

Check: substitute a=5a = -5 into 2a7=5a+82a - 7 = 5a + 8:

2(5)7=?5(5)+8107=?25+817=172(-5) - 7 \stackrel{?}{=} 5(-5) + 8 \qquad -10 - 7 \stackrel{?}{=} -25 + 8 \qquad -17 = -17 \checkmark

Note that we could have made the left side the variable side instead of the right side, but it would have led to a negative coefficient on the variable term. While we could work with the negative, there is less chance of error when working with positives. Choosing the side with the larger coefficient as the variable side helps avoid the negatives.

Solve: 2a2=6a+182a - 2 = 6a + 18.

To solve an equation with fractions, we still follow the same steps to get the solution.

Example. Solve: 32x+5=12x3\tfrac{3}{2}x + 5 = \tfrac{1}{2}x - 3.

Since 32>12\tfrac{3}{2} > \tfrac{1}{2}, make the left side the variable side and the right side the constant side.

Subtract 12x\tfrac{1}{2}x from both sides:

32x12x+5=12x12x3\tfrac{3}{2}x - \tfrac{1}{2}x + 5 = \tfrac{1}{2}x - \tfrac{1}{2}x - 3

Combine like terms:

x+5=3x + 5 = -3

Subtract 55 from both sides:

x+55=35x + 5 - 5 = -3 - 5

Simplify:

x=8x = -8

Check: substitute x=8x = -8 into 32x+5=12x3\tfrac{3}{2}x + 5 = \tfrac{1}{2}x - 3:

32(8)+5=?12(8)312+5=?437=7\tfrac{3}{2}(-8) + 5 \stackrel{?}{=} \tfrac{1}{2}(-8) - 3 \qquad -12 + 5 \stackrel{?}{=} -4 - 3 \qquad -7 = -7 \checkmark

Solve: 78x12=18x2\tfrac{7}{8}x - 12 = -\tfrac{1}{8}x - 2.

We follow the same steps when the equation has decimals, too.

Example. Solve: 3.4x+4=1.6x53.4x + 4 = 1.6x - 5.

Since 3.4>1.63.4 > 1.6, make the left side the variable side and the right side the constant side.

Subtract 1.6x1.6x from both sides:

3.4x1.6x+4=1.6x1.6x53.4x - 1.6x + 4 = 1.6x - 1.6x - 5

Combine like terms:

1.8x+4=51.8x + 4 = -5

Subtract 44 from both sides:

1.8x+44=541.8x + 4 - 4 = -5 - 4

Simplify:

1.8x=91.8x = -9

Use the Division Property of Equality:

1.8x1.8=91.8\tfrac{1.8x}{1.8} = \tfrac{-9}{1.8}

Simplify:

x=5x = -5

Check: substitute x=5x = -5 into 3.4x+4=1.6x53.4x + 4 = 1.6x - 5:

3.4(5)+4=?1.6(5)517+4=?8513=133.4(-5) + 4 \stackrel{?}{=} 1.6(-5) - 5 \qquad -17 + 4 \stackrel{?}{=} -8 - 5 \qquad -13 = -13 \checkmark

Solve: 2.8x+12=1.4x92.8x + 12 = -1.4x - 9.

Solve equations using a general strategy

Each of the first few sections of this chapter has dealt with solving one specific form of a linear equation. It’s time now to lay out an overall strategy that can be used to solve any linear equation. We call this the general strategy. Some equations won’t require all the steps to solve, but many will. Simplifying each side of the equation as much as possible first makes the rest of the steps easier.

Use a general strategy for solving linear equations.

  1. Simplify each side of the equation as much as possible. Use the Distributive Property to remove any parentheses. Combine like terms.
  2. Collect all the variable terms to one side of the equation. Use the Addition or Subtraction Property of Equality.
  3. Collect all the constant terms to the other side of the equation. Use the Addition or Subtraction Property of Equality.
  4. Make the coefficient of the variable term equal to 11. Use the Multiplication or Division Property of Equality. State the solution to the equation.
  5. Check the solution. Substitute the solution into the original equation to make sure the result is a true statement.

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

Simplify each side of the equation as much as possible using the Distributive Property:

3x+6=183x + 6 = 18

Collect all variable terms on one side of the equation — all xsx\text{s} are already on the left side.

Collect constant terms on the other side by subtracting 66 from each side:

3x+66=1863x + 6 - 6 = 18 - 6

Simplify:

3x=123x = 12

Make the coefficient of the variable term equal to 11. Divide each side by 33:

3x3=123\tfrac{3x}{3} = \tfrac{12}{3}

Simplify:

x=4x = 4

Check: substitute x=4x = 4 into 3(x+2)=183(x + 2) = 18:

3(4+2)=?183(6)=?1818=183(4 + 2) \stackrel{?}{=} 18 \qquad 3(6) \stackrel{?}{=} 18 \qquad 18 = 18 \checkmark

Solve: 5(x+3)=355(x + 3) = 35.

Solve: 6(y4)=186(y - 4) = -18.

Example. Solve: (x+5)=7-(x + 5) = 7.

Simplify each side of the equation as much as possible by distributing. The only xx term is on the left side, so all variable terms are on the left side of the equation:

x5=7-x - 5 = 7

Add 55 to both sides to get all constant terms on the right side of the equation:

x5+5=7+5-x - 5 + 5 = 7 + 5

Simplify:

x=12-x = 12

Make the coefficient of the variable term equal to 11 by multiplying both sides by 1-1:

1(x)=1(12)-1(-x) = -1(12)

Simplify:

x=12x = -12

Check: substitute x=12x = -12 into (x+5)=7-(x + 5) = 7:

(12+5)=?7(7)=?77=7-(-12 + 5) \stackrel{?}{=} 7 \qquad -(-7) \stackrel{?}{=} 7 \qquad 7 = 7 \checkmark

Solve: (y+8)=2-(y + 8) = -2.

Example. Solve: 4(x2)+5=34(x - 2) + 5 = -3.

Simplify each side of the equation as much as possible. Distribute, then combine like terms:

4x8+5=34x3=34x - 8 + 5 = -3 \quad\longrightarrow\quad 4x - 3 = -3

The only xx is on the left side, so all variable terms are on one side of the equation.

Add 33 to both sides to get all constant terms on the other side of the equation:

4x3+3=3+34x - 3 + 3 = -3 + 3

Simplify:

4x=04x = 0

Make the coefficient of the variable term equal to 11 by dividing both sides by 44:

4x4=04\tfrac{4x}{4} = \tfrac{0}{4}

Simplify:

x=0x = 0

Check: substitute x=0x = 0 into 4(x2)+5=34(x - 2) + 5 = -3:

4(02)+5=?34(2)+5=?38+5=?33=34(0 - 2) + 5 \stackrel{?}{=} -3 \qquad 4(-2) + 5 \stackrel{?}{=} -3 \qquad -8 + 5 \stackrel{?}{=} -3 \qquad -3 = -3 \checkmark

Solve: 2(a4)+3=12(a - 4) + 3 = -1.

Be careful when distributing a negative sign into parentheses.

Example. Solve: 82(3y+5)=08 - 2(3y + 5) = 0.

Simplify — use the Distributive Property:

86y10=08 - 6y - 10 = 0

Combine like terms:

6y2=0-6y - 2 = 0

Add 22 to both sides to collect constants on the right:

6y2+2=0+2-6y - 2 + 2 = 0 + 2

Simplify:

6y=2-6y = 2

Divide both sides by 6-6:

6y6=26\tfrac{-6y}{-6} = \tfrac{2}{-6}

Simplify:

y=13y = -\tfrac{1}{3}

Check: substitute y=13y = -\tfrac{1}{3} into 82(3y+5)=08 - 2(3y + 5) = 0:

82[3(13)+5]=?082(1+5)=?082(4)=?088=08 - 2\left[3\left(-\tfrac{1}{3}\right) + 5\right] \stackrel{?}{=} 0 \qquad 8 - 2(-1 + 5) \stackrel{?}{=} 0 \qquad 8 - 2(4) \stackrel{?}{=} 0 \qquad 8 - 8 = 0 \checkmark

Solve: 123(4j+3)=1712 - 3(4j + 3) = -17.

Example. Solve: 3(x2)5=4(2x+1)+53(x - 2) - 5 = 4(2x + 1) + 5.

Distribute:

3x65=8x+4+53x - 6 - 5 = 8x + 4 + 5

Combine like terms:

3x11=8x+93x - 11 = 8x + 9

Subtract 3x3x to get all the variables on the right since 8>38 > 3:

3x3x11=8x3x+93x - 3x - 11 = 8x - 3x + 9

Simplify:

11=5x+9-11 = 5x + 9

Subtract 99 to get the constants on the left:

119=5x+99-11 - 9 = 5x + 9 - 9

Simplify:

20=5x-20 = 5x

Divide by 55:

205=5x5\tfrac{-20}{5} = \tfrac{5x}{5}

Simplify:

4=x-4 = x

Check: substitute x=4x = -4 into 3(x2)5=4(2x+1)+53(x - 2) - 5 = 4(2x + 1) + 5:

3(42)5=?4[2(4)+1]+53(6)5=?4(7)+523=?28+523=233(-4 - 2) - 5 \stackrel{?}{=} 4[2(-4) + 1] + 5 \qquad 3(-6) - 5 \stackrel{?}{=} 4(-7) + 5 \qquad -23 \stackrel{?}{=} -28 + 5 \qquad -23 = -23 \checkmark

Solve: 6(p3)7=5(4p+3)126(p - 3) - 7 = 5(4p + 3) - 12.

Solve: 12(6x2)=5x\tfrac{1}{2}(6x - 2) = 5 - x.

In many applications, we will have to solve equations with decimals. The same general strategy will work for these equations.

Example. Solve: 0.24(100x+5)=0.4(30x+15)0.24(100x + 5) = 0.4(30x + 15).

Distribute:

24x+1.2=12x+624x + 1.2 = 12x + 6

Subtract 12x12x to get all the xsx\text{s} to the left:

24x+1.212x=12x+612x24x + 1.2 - 12x = 12x + 6 - 12x

Simplify:

12x+1.2=612x + 1.2 = 6

Subtract 1.21.2 to get the constants to the right:

12x+1.21.2=61.212x + 1.2 - 1.2 = 6 - 1.2

Simplify:

12x=4.812x = 4.8

Divide:

12x12=4.812\tfrac{12x}{12} = \tfrac{4.8}{12}

Simplify:

x=0.4x = 0.4

Check: substitute x=0.4x = 0.4 into 0.24(100x+5)=0.4(30x+15)0.24(100x + 5) = 0.4(30x + 15):

0.24(100(0.4)+5)=?0.4(30(0.4)+15)0.24(45)=?0.4(27)10.8=10.80.24(100(0.4) + 5) \stackrel{?}{=} 0.4(30(0.4) + 15) \qquad 0.24(45) \stackrel{?}{=} 0.4(27) \qquad 10.8 = 10.8 \checkmark

Solve: 0.55(100n+8)=0.6(85n+14)0.55(100n + 8) = 0.6(85n + 14).

Key terms

variable side — the side of an equation chosen to collect all the variable terms. constant side — the side of an equation chosen to collect all the constant terms. general strategy — a five-step method (simplify each side, collect variable terms, collect constant terms, make the coefficient 11, check) that solves any linear equation, regardless of its starting form.


This section is adapted from Prealgebra 2e, Section 8.3: Solve Equations with Variables and Constants on Both Sides by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: omitted the Be Prepared quiz, Media links, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.