There were w dollars in Olivia's wallet. She collected x more dollars from an atm. After she visited a supermarket there were x dollars left. How much more money did she collect at the atm than she spent at the supermarket?
Firstly, we know that Olivia had w dollars in her wallet. 

Secondly, she collected x more dollars from an ATM, so now she has w + x dollars. 

Lastly, she spent some money at the supermarket, so she now has w + x - y dollars left in her wallet. 

We are trying to figure out how much more money she collected at the ATM than she spent at the supermarket, so we want to set up an equation that will give us that answer. 

w + x - y = z 

z = w + x - y 

z = the amount of money left in her wallet 

w = the amount of money she had in her wallet to begin with 

x = the amount of money she collected from the ATM 

y = the amount of money she spent at the supermarket 

Therefore, z - w = the amount of money she collected from the ATM - the amount of money she spent at the supermarket. 

z - w = x - y 

We want to solve for x - y, which is the amount of money she collected from the ATM - the amount of money she spent at the supermarket