A chef had w apples and x peaches. After making some pies, he had y apples left. How many apples did he use?
Let's denote the number of apples used by the chef by a.

a = w - y

Plugging in for w and y we get that a = w - y = w - (x - a) = 2a - x.

Therefore, the answer (symbolic expression) is: 

2a - x