Paco had w cookies. He ate x of them. Then he bought y more cookies How many cookies did Paco have left?
Paco had w cookies. He ate x of them. Then he bought y more cookies. 

Paco had 40 cookies. He ate 2 of them. Then he bought 37 more cookies. 

Paco had 2 cookies left.