Ed had 6 more marbles than Doug. Doug lost 7 of his marbles at the playground. If Ed had 22 marbles how many marbles does Doug have now?
Let's denote Doug's number of marbles as $x$ and Ed's number of marbles as $y$. 

Then we have $y=x+6$ and $x-7=y-6$, which is equivalent to $x=y-1$. 

Substituting this value of $x$ into the first equation, we get $y=y-1+6$, which is equivalent to $y=5$. 

Thus, Doug has $4$ marbles now.