Let x = the number of songs you can buy.
If you use company A at 0.79 dollars per song, your variable is 0.79x. If you use company B at 0.99 dollars per song, your variable is 0.99x. You are going to set both equal to 30.
Company A: 0.79x = 30
Company B: 0.99x = 30
When solving (though I know you didn't ask), do note that you cannot buy part of a song so you would need to round down to the nearest whole number.
So if you use company A, you divide both sides by 0.79 to isolate the variable x and satisfy the division principle of equality:
x = 30/0.79.
Simplify and your answer is 37.97, round down to 37 songs; you'd have 37 songs with company A and 77 cents left over in your account just sitting there because what really can you do with 77 cents on the App Store?