I was wrong
The limit is the earnings when the income is below the total of allowed contributions, You can split it up but with $6,000 earnings , the total limit is $5,500 and $500 up to the earnings limit but not ( $5,500 + $5,500 ).
Note: the irs does not consider the earnings to be the number they use, I think they use the MAGI, which could end up being the same number or close.
I had to look it up and it is tricky to find, and the irs site didn't help, but this site had a good explanation.
Special rule for spouses
If you’re married and you file a joint return, you can make a regular contribution to a Roth IRA even if you have little or no qualifying income. Solely for the purpose of determining how much you can contribute to an IRA, you’ll be treated as if you had taxable compensation income equal to:
- Your qualifying income (if any), plus
- Your spouse’s qualifying income (if any), minus
- Your spouse’s regular contributions to traditional IRAs and Roth IRAs.