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, and solve an equation with variables and constants on both sides.

Solve Equations with Constants on Both Sides

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 will learn to solve equations in which the variable terms, or constant terms, or both 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 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 began 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: 7x+8=137x + 8 = -13.

In this equation, the variable is found 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 88 is out of place. We must “undo” adding 88 by subtracting 88 from both sides.

7x+8=13Subtract 8 from both sides.7x+88=138Simplify.7x=21The variables are now on the left and the constant onthe right. Divide both sides by 7.7x7=217Simplify.x=3 \begin{array}{lrcl} & 7x + 8 &=& -13 \\[4pt] \text{Subtract 8 from both sides.} & 7x + 8 - 8 &=& -13 - 8 \\[4pt] \text{Simplify.} & 7x &=& -21 \\[4pt] \text{The variables are now on the left and the constant on} & & & \\[4pt] \text{the right. Divide both sides by 7.} & \tfrac{7x}{7} &=& \tfrac{-21}{7} \\[4pt] \text{Simplify.} & x &=& -3 \end{array}

Check: let x=3x = -3. 7(3)+8=?137(-3) + 8 \overset{?}{=} -13, so 21+8=?13-21 + 8 \overset{?}{=} -13, and 13=13-13 = -13. ✓

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

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

Example. Solve: 8y9=318y - 9 = 31.

The variable is only on the left side, so we call this side the “variable” side, and the right side is the “constant” side. Since the left side is the variable side, the 99 is out of place — it is subtracted from 8y8y, so to “undo” the subtraction, add 99 to both sides.

8y9=31Add 9 to both sides.8y9+9=31+9Simplify.8y=40Divide both sides by 8.8y8=408Simplify.y=5 \begin{array}{lrcl} & 8y - 9 &=& 31 \\[4pt] \text{Add 9 to both sides.} & 8y - 9 + 9 &=& 31 + 9 \\[4pt] \text{Simplify.} & 8y &=& 40 \\[4pt] \text{Divide both sides by 8.} & \tfrac{8y}{8} &=& \tfrac{40}{8} \\[4pt] \text{Simplify.} & y &=& 5 \end{array}

Check: let y=5y = 5. 8(5)9=?318(5) - 9 \overset{?}{=} 31, so 409=?3140 - 9 \overset{?}{=} 31, and 31=3131 = 31. ✓

Solve: 5y9=165y - 9 = 16.

Solve: 3m8=193m - 8 = 19.

Solve Equations with Variables on Both Sides

What if there are variables on both sides of the equation? For equations like this, begin as we did above — choose 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.

Example. Solve: 9x=8x69x = 8x - 6.

Here the variable is on both sides, but the constants only appear 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 xsx\text{s} on the right, so subtract 8x8x from both sides.

9x=8x6Subtract 8x from both sides.9x8x=8x8x6Simplify.x=6 \begin{array}{lrcl} & 9x &=& 8x - 6 \\[4pt] \text{Subtract 8x from both sides.} & 9x - 8x &=& 8x - 8x - 6 \\[4pt] \text{Simplify.} & x &=& -6 \end{array}

We succeeded in getting the variables on one side and the constants on the other, and have obtained the solution.

Check: let x=6x = -6. 9(6)=?8(6)69(-6) \overset{?}{=} 8(-6) - 6, so 54=?486-54 \overset{?}{=} -48 - 6, and 54=54-54 = -54. ✓

Solve: 6n=5n106n = 5n - 10.

Solve: 6c=7c1-6c = -7c - 1.

Example. Solve: 5y9=8y5y - 9 = 8y.

The only constant is on the left and the ysy\text{s} are on both sides. Let’s leave the constant on the left and get the variables to the right. Subtract 5y5y from both sides.

5y9=8ySubtract 5y from both sides.5y5y9=8y5ySimplify.9=3yWe have the y’s on the right and the constants on theleft. Divide both sides by 3.93=3y3Simplify.3=y \begin{array}{lrcl} & 5y - 9 &=& 8y \\[4pt] \text{Subtract 5y from both sides.} & 5y - 5y - 9 &=& 8y - 5y \\[4pt] \text{Simplify.} & -9 &=& 3y \\[4pt] \text{We have the y's on the right and the constants on the} & & & \\[4pt] \text{left. Divide both sides by 3.} & \tfrac{-9}{3} &=& \tfrac{3y}{3} \\[4pt] \text{Simplify.} & -3 &=& y \end{array}

Check: let y=3y = -3. 5(3)9=?8(3)5(-3) - 9 \overset{?}{=} 8(-3), so 159=?24-15 - 9 \overset{?}{=} -24, and 24=24-24 = -24. ✓

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

Solve: 8m+9=5m8m + 9 = 5m.

Example. Solve: 12x=x+2612x = -x + 26.

The only constant 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.

12x=x+26Add x to both sides.12x+x=x+x+26Simplify.13x=26All the x’s are on the left and the constants are onthe right. Divide both sides by 13.13x13=2613Simplify.x=2 \begin{array}{lrcl} & 12x &=& -x + 26 \\[4pt] \text{Add x to both sides.} & 12x + x &=& -x + x + 26 \\[4pt] \text{Simplify.} & 13x &=& 26 \\[4pt] \text{All the x's are on the left and the constants are on} & & & \\[4pt] \text{the right. Divide both sides by 13.} & \tfrac{13x}{13} &=& \tfrac{26}{13} \\[4pt] \text{Simplify.} & x &=& 2 \end{array}

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

Solve: 8h=4h+128h = -4h + 12.

Solve Equations with Variables and Constants on Both Sides

The next examples will be the first to have variables and constants on both sides of the equation. It may take several steps to solve an equation like this, so we need a clear and organized strategy.

How to solve equations with variables and constants on both sides.

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

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

The variable terms are 7x7x and 6x6x. Since 77 is greater than 66, we will make the left side the “xx” side, and the right side the “constant” side.

With the right side as the “constant” side, the 6x6x is out of place, so subtract 6x6x from both sides and combine like terms — now the variable is only on the left side.

7x+5=6x+2Subtract 6x from both sides.7x6x+5=6x6x+2Combine like terms.x+5=2 \begin{array}{lrcl} & 7x + 5 &=& 6x + 2 \\[4pt] \text{Subtract 6x from both sides.} & 7x - 6x + 5 &=& 6x - 6x + 2 \\[4pt] \text{Combine like terms.} & x + 5 &=& 2 \end{array}

The right side is the “constant” side, so the 55 is out of place. Subtract 55 from both sides.

x+55=25Simplify.x=3 \begin{array}{lrcl} & x + 5 - 5 &=& 2 - 5 \\[4pt] \text{Simplify.} & x &=& -3 \end{array}

The coefficient of xx is already 11, so the equation is solved.

Check: let x=3x = -3. 7x+5=6x+27x + 5 = 6x + 2 becomes 7(3)+5=?6(3)+27(-3) + 5 \overset{?}{=} 6(-3) + 2, so 21+5=?18+2-21 + 5 \overset{?}{=} -18 + 2, and 16=16-16 = -16. ✓

Solve: 12x+8=6x+212x + 8 = 6x + 2.

Solve: 9y+4=7y+129y + 4 = 7y + 12.

We’ll list the steps above so you can easily refer to them, calling this the “Beginning Strategy” because we’ll be adding some steps to it later in this chapter. In Step 1, a helpful approach is to make the “variable” side the side that has the variable with the larger coefficient. This usually makes the arithmetic easier.

Example. Solve: 8n4=2n+68n - 4 = -2n + 6.

In the first step, choose the variable side by comparing the coefficients of the variables on each side. Since 8>28 > -2, make the left side the “variable” side. We don’t want variable terms on the right side, so add 2n2n to both sides to leave only constants on the right.

8n4=2n+6Add 2n to both sides.8n+2n4=2n+2n+6Combine like terms.10n4=6We don’t want any constants on the left side, so add4 to both sides.10n4+4=6+4Simplify.10n=10Divide both sides by 10.10n10=1010Simplify.n=1 \begin{array}{lrcl} & 8n - 4 &=& -2n + 6 \\[4pt] \text{Add 2n to both sides.} & 8n + 2n - 4 &=& -2n + 2n + 6 \\[4pt] \text{Combine like terms.} & 10n - 4 &=& 6 \\[4pt] \text{We don't want any constants on the left side, so add} & & & \\[4pt] \text{4 to both sides.} & 10n - 4 + 4 &=& 6 + 4 \\[4pt] \text{Simplify.} & 10n &=& 10 \\[4pt] \text{Divide both sides by 10.} & \tfrac{10n}{10} &=& \tfrac{10}{10} \\[4pt] \text{Simplify.} & n &=& 1 \end{array}

Check: let n=1n = 1. 8(1)4=?2(1)+68(1) - 4 \overset{?}{=} -2(1) + 6, so 84=?2+68 - 4 \overset{?}{=} -2 + 6, and 4=44 = 4. ✓

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

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

Example. Solve: 7a3=13a+77a - 3 = 13a + 7.

In the first step, choose the variable side by comparing the coefficients of the variables on each side. Since 13>713 > 7, make the right side the “variable” side and the left side the “constant” side.

7a3=13a+7Subtract 7a from both sides to remove the variableterm from the left.7a7a3=13a7a+7Combine like terms.3=6a+7Subtract 7 from both sides to remove the constantfrom the right.37=6a+77Simplify.10=6aDivide both sides by 6 to make 1 the coefficient of a.106=6a6Simplify.53=a \begin{array}{lrcl} & 7a - 3 &=& 13a + 7 \\[4pt] \text{Subtract 7a from both sides to remove the variable} & & & \\[4pt] \text{term from the left.} & 7a - 7a - 3 &=& 13a - 7a + 7 \\[4pt] \text{Combine like terms.} & -3 &=& 6a + 7 \\[4pt] \text{Subtract 7 from both sides to remove the constant} & & & \\[4pt] \text{from the right.} & -3 - 7 &=& 6a + 7 - 7 \\[4pt] \text{Simplify.} & -10 &=& 6a \\[4pt] \text{Divide both sides by 6 to make 1 the coefficient of a.} & \tfrac{-10}{6} &=& \tfrac{6a}{6} \\[4pt] \text{Simplify.} & -\tfrac{5}{3} &=& a \end{array}

Check: let a=53a = -\tfrac{5}{3}. 7(53)3=?13(53)+77\left(-\tfrac{5}{3}\right) - 3 \overset{?}{=} 13\left(-\tfrac{5}{3}\right) + 7, so 35393=?653+213-\tfrac{35}{3} - \tfrac{9}{3} \overset{?}{=} -\tfrac{65}{3} + \tfrac{21}{3}, and 443=443-\tfrac{44}{3} = -\tfrac{44}{3}. ✓

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

Solve: 4k1=7k+174k - 1 = 7k + 17.

In the last example, we could have made the left side the “variable” 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 errors when working with positives. The strategy outlined above helps avoid the negatives!

To solve an equation with fractions, we just follow the steps of our strategy to get the solution.

Example. Solve: 54x+6=14x2\tfrac{5}{4}x + 6 = \tfrac{1}{4}x - 2.

Since 54>14\tfrac{5}{4} > \tfrac{1}{4}, make the left side the “variable” side and the right side the “constant” side.

54x+6=14x2Subtract 14x from both sides.54x14x+6=14x14x2Combine like terms.x+6=2Subtract 6 from both sides.x+66=26Simplify.x=8 \begin{array}{lrcl} & \tfrac{5}{4}x + 6 &=& \tfrac{1}{4}x - 2 \\[4pt] \text{Subtract } \tfrac{1}{4}x \text{ from both sides.} & \tfrac{5}{4}x - \tfrac{1}{4}x + 6 &=& \tfrac{1}{4}x - \tfrac{1}{4}x - 2 \\[4pt] \text{Combine like terms.} & x + 6 &=& -2 \\[4pt] \text{Subtract 6 from both sides.} & x + 6 - 6 &=& -2 - 6 \\[4pt] \text{Simplify.} & x &=& -8 \end{array}

Check: let x=8x = -8. 54(8)+6=?14(8)2\tfrac{5}{4}(-8) + 6 \overset{?}{=} \tfrac{1}{4}(-8) - 2, so 10+6=?22-10 + 6 \overset{?}{=} -2 - 2, and 4=4-4 = -4. ✓

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

Solve: 76y+11=16y+8\tfrac{7}{6} y + 11 = \tfrac{1}{6} y + 8.

We will use the same strategy to find the solution for an equation with decimals.

Example. Solve: 7.8x+4=5.4x87.8x + 4 = 5.4x - 8.

Since 7.8>5.47.8 > 5.4, make the left side the “variable” side and the right side the “constant” side.

7.8x+4=5.4x8Subtract 5.4x from both sides.7.8x5.4x+4=5.4x5.4x8Combine like terms.2.4x+4=8Subtract 4 from both sides.2.4x+44=84Simplify.2.4x=12Use the Division Property of Equality.2.4x2.4=122.4Simplify.x=5 \begin{array}{lrcl} & 7.8x + 4 &=& 5.4x - 8 \\[4pt] \text{Subtract 5.4x from both sides.} & 7.8x - 5.4x + 4 &=& 5.4x - 5.4x - 8 \\[4pt] \text{Combine like terms.} & 2.4x + 4 &=& -8 \\[4pt] \text{Subtract 4 from both sides.} & 2.4x + 4 - 4 &=& -8 - 4 \\[4pt] \text{Simplify.} & 2.4x &=& -12 \\[4pt] \text{Use the Division Property of Equality.} & \tfrac{2.4x}{2.4} &=& \tfrac{-12}{2.4} \\[4pt] \text{Simplify.} & x &=& -5 \end{array}

Check: let x=5x = -5. 7.8(5)+4=?5.4(5)87.8(-5) + 4 \overset{?}{=} 5.4(-5) - 8, so 39+4=?278-39 + 4 \overset{?}{=} -27 - 8, and 35=35-35 = -35. ✓

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

Solve: 3.6y+8=1.2y43.6y + 8 = 1.2y - 4.

Key terms

variable side — the side of an equation that we choose to collect all the variable terms onto, using the Addition or Subtraction Property of Equality. constant side — the side of an equation that we choose to collect all the constant terms onto. Beginning Strategy for Solving Equations with Variables and Constants on Both Sides — choose the variable side and constant side; collect the variable terms onto the variable side; collect the constants onto the constant side; make the coefficient of the variable equal to 11; check the solution.


This section is adapted from Elementary Algebra 2e, Section 2.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: recreated the labeled variable/constant side worked-example tables as prose with typeset math steps; omitted the Manipulative Mathematics callouts, media links, Self Check checklist, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.