Since you are filing part year resident returns for each state, you will indicate which amounts were taxable in each state. Mark the $5,000 as NJ income and be sure it is subtracted from the PA income.
The two states will compare and it will be clear that all income is accounted for between the states.
Be sure to choose part year, be sure to fill in the boxes when asked about income.

**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"