Paco had w cookies. He gave x cookies to his friend and ate y cookies. How many more cookies did he eat than those he gave to his friend?

Paco had w cookies. He gave x cookies to his friend. This means that he has w - x cookies left. He ate y cookies, which means that he has w - x - y cookies left in total. 

We want to know how many more cookies he ate than those he gave to his friend. This means we want to know how many cookies his friend has. His friend has x cookies. 

Therefore, the answer is w - x - y - x, or w - 2x - y.