Multi-state taxes are a challenge. The good news is that you won't have to pay full taxes for both states. The bad news is that you're probably going get a notice of underpayment from one of the states. For me, I reside in IL but worked in PA. Since IL is my state of residence, I filed for a full refund from PA and paid taxes in IL. PA rejected it and I had to submit amended returns for both states PA to pay and IL to get a refund. It was a hassle.
I know this isn't a great help. But your situation may be easier. Logically, it should be prorated based on where you lived. I hope this helps.