Why is my NY tax so high when I worked in PA and paid tax in PA but lived in NY and earned income in NY? It is counting the PA income in both states?

I made 49600 in PA and 10252. in NY were I live. I did the Non resident return first which I owed ) but paid 1532. in taxes. But NY is taxing me on the 49600 + 10252. which isn't right?