State tax filing

Hi, i understand I need to file a return.  My initial wuestion should be edited since I said i should be refunded 100% state but what i meant was only the part while living in Texas.  

 

My question is if i need to pay taxes on the part that I earned while living outside of MA as non resident.  From what i have read, I dont need to pay taxes on that part.  I have to file for a refund since these state taxes were taken out of my check.  Maybe this is not accurate.