How to calculate double-taxed income NY and PA?

There is a form to calculate the amounts taxed by both Pennsylvania and New York and the tax due on that income and I am completely lost in terms of how to fill it out. The context is that I worked in NYC and was a resident up until 8/1/22 when I moved to Philadelphia (so I think I was a partial resident in both NY/PA this year). I stayed at the same job in NYC through the move. I've heard that we are suppose to get a credit on the state tax paid in NY on the PA return, but am at a lost for how to fill out this form. Would greatly appreciate any guidance. 

 

Screen Shot 2023-02-22 at 11.19.49 PM.png