The general rule is: your report all your income on your home state return, even the income earned out of state. You file a non-resident state return for the state you worked in and pay tax to that state. Your home state will give you a credit, or partial credit, for what you paid the non-resident state. You will have to file a non resident NY state return and pay NY tax on the income earned there.. You will also file a PA full year resident return and calculate tax on ALL your income. PA will give you a partial credit for the tax you pay NY. So, there will be little or no double taxation, but you have the cost and hassle of filing two state returns. Do the nonresident state return first. Doing the returns in the correct sequence insures that your PA return will include the credit for the tax you pay to NY.
A small refund from NY would not be unusual. It just means you had too much NY tax withheld. Owing PA is not all that unusual. You will only get a credit equal to the PA tax on your NY income. You still have to pay PA tax on your other income. Verify that the NY credit shows up on line 22 of the PA-40 form.