State tax filing

So when I fill the NY return I would use the amount next to "Total payments"? As the amount to credit?

image.png

And when filling the credit part I also get asked the following:

image.png

 

The NY total is pre-filled with basically my whole year's income (not sure why I can't change it?) although I only lived here for half the year. And when filling the portion taxed by NJ I also have the whole salary there (which I'm guessing I would have because I made all of the salary/worked there throughout).
Thank you!