You have to complete the resident CA return first, then the nonresident AZ return. That is so TT/AZ can get some of the information it needs to complete the other state tax credit for the income earned in AZ that is being taxed by both states. You may have to tell TT/AZ how much that income is since it's the nonresident return and may not be able to figure it out itself.
So TT/AZ needs to know the $$ income that both AZ & CA are taxing (that's probably the entire amount of AZ income? What AZ income are you reporting? A rental?) and the CA tax on that income. For the tax $$, take that double taxed income, divide it by the Calif taxable income on Form 540 line 19, and multiply that fraction by the tax on line 48.