Answer:
6 cookies left over
Step-by-step explanation:
In the picture, I hope that it's a clear solution.
do what
x=1, y=-6. (1, -6).
y=-6x
-2x-7y=40
------------------
-2x-7(-6x)=40
-2x+42x=40
40x=40
x=40/40
x=1
y=-6(1)=-6