Consider the following system of linear equations:

x=-2y-2...(1)

2x+5y=-7...(2)

Substitute equation (1) in equation (2):

2(-2y-2)+5y=-7

-4y-4+5y=-7

y=-7+4

y=-3

\(\displaystyle{x}=-{2}\times{\left(-{3}\right)}-{2}\)

=6-2

=4

x=-2y-2...(1)

2x+5y=-7...(2)

Substitute equation (1) in equation (2):

2(-2y-2)+5y=-7

-4y-4+5y=-7

y=-7+4

y=-3

\(\displaystyle{x}=-{2}\times{\left(-{3}\right)}-{2}\)

=6-2

=4