State tax filing

Residency is determined by several things ---such as where you receive mail, where you work, where you vote, etc. What does NOT determine residency is where you got your driver's license.

Also included in the decision is where do you go at night to eat, sleep, etc.  Based on what you stated, you would may be required to file (for 2018) as a part-year resident of BOTH states. 

On what basis do you believe that you are a 'legal' resident of another state?  If you claim a state as your residence because you go to school there, that is not necessarily a 'residence' --wait until you graduate and get a full time job to determine your ultimate residence.

By the way, one common mistake many people make (when they move) is that their driver’s license determines where they reside.  To the contrary, many/most states consider it a VIOLATION of the motor vehicle laws of the state if you do not surrender your previous driver’s license and obtain a license in that state within 30-60 days.