CTY
New Member

State tax filing

Generally, you will have to file a non-resident tax return for income you received while working in a state that is different from where you live.  Therefore, you are correct that you'll file a resident New York return for Jan 2018 to June 2018, and a non-resident New York state return for July 2018 to August 2018. Plus, you will need to file a resident Texas state return for the time where you are a resident of that state.   

To ensure accurate calculations, TurboTax strongly recommends preparing your nonresident state return before you prepare your resident state return. Here's additional info on how to file a nonresident state return:
https://ttlc.intuit.com/replies/3302052