Stephanie has a $40 balance on her credit card. She makes two additional charges to pay $20 for gas and $25 for parking. Then she makes a credit card payment of $30.
It she has a total of $40 and you take away the $20 she spent of gas and the $25 she spent for parking she would have -$5 but since she paid $30 back on the card she has a balance of $25