You need to prepare the following tax returns in this order to receive the proper credits: Federal, New Jersey Non Resident, Pennsylvania Resident.
You will file a New Jersey Non-Resident Tax Return to receive a refund for the taxes withheld.
You will report your New Jersey sourced income to receive a full tax refund.
For more information, follow these links:
NJ Taxes
on Non Residents
PA Who
Must File