What should go in line 4a and 4b on Schedule G-L : NY and PA

Hi,  my husband and I lived in PA last year till mid Oct and for the whole time we both were working for a NY employer. In mid Oct, we moved to NY and continue working for the same NY employer. As we are doubled taxed(NY and PA), I am eligible to get credit for the taxes I paid to NY. For that I need to fill out schedule G-L. My question is how to calculate the amount that goes on line 4a and 4b?