For your Resident Return to New Jersey, you report your Total Income and then get 'Credit for Tax Paid to Other States'.
Prepare your Non-Resident New York return first, then your Resident NJ return.
Click this link for more detail about How to File a Non-Resident Return.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"