Let x be the interest on the first bank with 20% interest and y be the amount of the interest on the onilne bank with 4.5% interest.
Thus, the total amount on the banks can be represented as follows:

On the other hand, the total interest can also be represented as follows:

Using the first equation, solve for the value of x.

Substitute the obtained value of x into the second equation.

Simplify the left side of the equation. Distribute 0.2 to 42000-y and then combine like terms.

Add 0.155y and subtract 2510 on both sides of the equation.

Divide both sides of the equation by 0.155.

To solve for x, substitute the obtained value of x into the first obtained equation.

Subtract 38000 from both sides of the equation.

Thus, she put $4000 on the credit card which charges 20% interest and put $38000 on the credit card which charges 4.5%.