Even though there is reciprocity, you were a part-year resident in both states for 2017, therefore you will need to file part-year resident returns for both states: A part-year return for the 8 months lived in PA and a part-year return for the 4 months lived in NJ. For 2018, if you live in NJ for the whole year, you will just have to file a return for NJ (and not for PA since there is the reciprocity agreement between the two states.)
You will want to enter your W-2 exactly as reported with the two states income and taxes withheld. This will identify what state income tax is to be taxed in each state.
Here is more information on how to file a part-year resident return:
https://ttlc.intuit.com/replies/3302008