When you are only partially paying your balances (and paying interest), you will be paying toward two separate balances: your purchase totals and your cash advance totals (I’m leaving possible existing transfer situations out right now.) How much of each payment goes toward the purchase balance and how much of it goes toward the cash advance balance?
Payments are usually allocated to first pay off the balance that carries the lowest interest rate. This is typically the purchase balance. As an example, if your cash advance balance is $500 and your purchase balance is $125, a $100 payment will go entirely toward reducing your purchase balance to $25. This allocation is totally in the interest of credit card companies (again, pun fully intended). They are maximizing their profits.