This is because the question is about the cash balance and not about the capital.

Now the exaplanation to teh answer is that

when you deposited the cash of $5000 you have debit balance in your entity when sales are made, your cash balance will increase and therefore it is debited (i think you are confused since you are thinking taht the sales has credit balance. this is true but here we are considering the cash generated from cash and therefore debit).

I think rest you understood