solve by the substitution method

3x+5y=21
x=51-9y

To solve the system of equations using the substitution method, we'll start by solving one equation for one variable and then substituting that expression into the other equation.

Let's solve the second equation for x:

x = 51 - 9y

Now, substitute this value of x into the first equation:

3(51 - 9y) + 5y = 21

Distribute the 3:

153 - 27y + 5y = 21

Combine like terms:

-22y = -132

Divide both sides by -22:

y = (-132) / (-22) = 6

Now that we have the value of y, we can substitute it back into any of the original equations. Let's use the second equation:

x = 51 - 9(6) = 51 - 54 = -3

So the solution to the system of equations is x = -3 and y = 6.