State tax filing

Thanks so much for your help! I'm getting the error at the end of the Federal tax return where its flagged by the smart check.

 

I am working in NYC and on the W2 it shows the state as NY (not PA), but the locality withholding is for Philadelphia. I thought this would be expected - since I'm not living in NYC I shouldn't be subject to the local tax and instead am taxed in Philly. And then for state, I am taxed in NY but then can claim a credit on PA return. Is that understanding correct?