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?
Ed had w more marbles than Doug. This means that if we start with Doug's marbles, and add w, we will get Ed's marbles. So we can write:

Doug's marbles + w = Ed's marbles

Doug lost x of his marbles at the playground. This means that if we start with Doug's marbles, and subtract x, we will get the number of marbles Doug has now. So we can write:

Doug's marbles - x = the number of marbles Doug has now

We can solve this using algebra. We know that Doug's marbles + w = Ed's marbles, and Doug's marbles - x = the number of marbles Doug has now. If we set these equal to each other, we can solve for Doug's marbles.

Doug's marbles + w = Doug's marbles - x

w = -x

Doug's marbles = x - w

Doug's marbles = x + (-x)

Doug's marbles = 0

This means that Doug has 0 marbles now.