Ed had w more marbles than Doug. Doug lost x of his marbles at the playground. If Ed had y marbles How many marbles does Doug have now?
Let's say that Doug had m marbles before he lost any. Then:

m - x = w + y

m = w + y + x

So, Doug has w + y + x - x = w + y marbles now.