Just because you moved in with family does not make you a resident of any state. Each state has it's own residency requirements. One of those requirements for just about all states, is that you must be able to show your "intent" to make that state your permanent resident. Another requirement for most states (not all) is that you have lived in that state for anywhere from 6 months to a year. Again, it depends on the laws/rules of the specific state.
You at best, will be filing "at least" a part year resident return for VA.
But if you have no "intent" to make MD your state of residence, and you don't meet the requirements that would allow MD to consider you a resident weather you like it or not, you'll be filing a non-resident return for MD and a full year resident return for VA.