State tax filing

You are subject to Arizona income tax on all income derived from Arizona sources. If you are in the state for a temporary or transitory purpose or did not live in Arizona but received income from sources within Arizona during 2017, you are subject to Arizona tax. 

File a nonresident return in AZ, and then a resident one in MD (where you also claim the AZ income).  MD will give you credit for taxes paid to AZ.

http://taxes.marylandtaxes.com/Individual_Taxes/Individual_Tax_Types/Income_Tax/Filing_Information/D...

View solution in original post