Step 1 solve for one variable
2x = -4 - 4y
x = -2 - 2y
Step 2 eliminate by substituting into second equation and solve
2 * (-2-2y) + 5y = 40
-4 - 4y + 5y = 40
y = 36
Step 3 put y into any original equation
7x + 5*36 = 40
7x + 180 = 40
7x = -140
x = -20
So
X = -20 and Y = 36