First you need to understand the structure of the commission.
The first part is 6% commission on sales up to $500.
The second part is 8% commission on sales over $500.
Note that the second part doesn't mean that a sale of $800 gets 8% of $800.
It means that once we have reached $500, any *further* sales get 8%.
Since $800 is $300 more than $500, the commission is
6% of $500 +
8% of $300
The first thing she did was work out the excess above $500.
Then she worked out the two percentages in two separate parts.
The second part seems to have incurred a cut and past accident, not sure if that is yours or it was already done.