I thought I was going to stay most of the year in Arizona, so I switched my driver’s license and car registration to Arizona. However, I decided to stay at my home in Maine but yet to change both back to Maine. I do not own the house or pay rent. I only help with utilities (not in my name except for cable and phone service). I work in Maine and I worked in Arizona in 2024. Should I edit my address to the address I have in Arizona for the next couple of months, or should I keep it as is, which is my Maine address?
Use the address where you want the IRS or the states to send your mail in case they mail you a letter or a check.
You will need to file part year state returns for each of the states that you lived and worked in.
https://ttlc.intuit.com/questions/1901227-how-do-i-file-a-part-year-state-return
https://ttlc.intuit.com/questions/1901560-how-do-i-file-if-i-moved-to-a-different-state-last-year
But if you kept your main home in Maine all year and went to Arizona temporarily, and you spent 9 months or less in Arizona, then you would file a non-resident AZ tax return and a resident ME tax return.
https://azdor.gov/sites/default/files/2023-03/PROCEDURES_INDIV_1992_itp92-1.pdf
As @xmasbaby0 said, the address you put on your tax return should be the address you want the IRS or state taxing agency to use if they have to send you a letter or a check. Your state tax obligations are not determined by your mailing address.