i need help solving the problem

3x+y=-1
2x+3y=18
using substitution

3x+y=-1

y = -1 -3x

2x+3y=18
2x + 3(-1-3x) = 18
2x - 3 - 9x = 18
-7x = 21
x = -3

Substitute -3 for x in the first problem to find the value of y.

matrix[2x,0

4,-y]=matrix[4,0
4,1]

To solve the system of equations using substitution, you'll need to solve one equation for one variable, and then substitute that expression into the other equation.

Let's use the first equation, 3x + y = -1, and solve it for one variable. Since y is already isolated, let's solve for y in terms of x:

3x + y = -1
y = -1 - 3x

Now, we can substitute this expression for y into the second equation, 2x + 3y = 18. Replace y with -1 - 3x in the second equation:

2x + 3(-1 - 3x) = 18

Now, solve this equation for x:

2x - 3 - 9x = 18
-7x - 3 = 18
-7x = 21
x = -3

Substitute the value of x back into one of the original equations to solve for y. Let's use the first equation:

3x + y = -1
3(-3) + y = -1
-9 + y = -1
y = 8

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