I was a travel nurse for 5 months in CA, but was a resident of IN. Then was hired at that hospital and moved officially to Ca. Which state tax should I file first?

I was a travel nurse for 5 months in CA, but was a resident of IN (drivers license, registration, and owned a home and pay property tax). Then was hired at the hospital I was working at, sold my house and became an official resident of CA. CA collected all my income tax for the entire year. Which state should I file my income tax return for first?