Live in NY and worked in both NY and PA

I live in New York and have W2 for NY and PA. How do I file my taxes for 2022 correctly? I believe NY will give me a credit for taxes I pay to the non-resident state, so that I am not double-taxed. FYI, my W2 for non-resident state indicates on Box 15 State Employer's State ID is 'NY', what does this mean?

 

Please elaborate...  Many thanks in advance!