solve by substitution

3x-y = -7
x+y = -9

Substitute 3x+7 for y in the second equation, and solve the resulting equation for x.

To solve this system of equations by substitution, we can start by isolating one variable in one of the equations and substitute it into the other equation.

Let's solve the first equation for y:
3x - y = -7
-y = -7 - 3x (subtract 3x from both sides)
y = 3x + 7 (multiply both sides by -1 to isolate y)

Now we can substitute 3x + 7 for y in the second equation:
x + (3x + 7) = -9 (substitute y with 3x + 7)
4x + 7 = -9 (combine like terms)

Next, we can solve the resulting equation for x:
4x = -9 - 7 (subtract 7 from both sides)
4x = -16 (combine like terms)
x = -16/4 (divide both sides by 4)
x = -4

Now that we have the value of x, we can substitute it back into one of the original equations to find the value of y. Let's use the first equation:
3x - y = -7
3(-4) - y = -7 (substitute x with -4)
-12 - y = -7 (multiply)
-y = -7 + 12 (add 12 to both sides)
-y = 5 (combine like terms)
y = -5

Therefore, the solution to the system of equations is x = -4 and y = -5.