use the substition method to solve the system of equations

5x+2y=1
y=-x+2

To solve the system of equations using the substitution method, we'll begin with the second equation:

y = -x + 2

Now substitute this value of y into the first equation:

5x + 2(-x+2) = 1

Simplify the equation:

5x - 2x + 4 = 1
3x + 4 = 1

Subtract 4 from both sides:

3x = -3

Divide both sides by 3:

x = -1

Now substitute this value of x back into the second equation to solve for y:

y = -(-1) + 2
y = 1 + 2
y = 3

Therefore, the solution to the system of equations is x = -1 and y = 3.