How to compute double taxed income while a resident of New Jersey?

Hi

 

I have to file two states, New York and New Jersey. I have moved from New York to New Jersey.

 

How do I compute the double taxed income? Do I take the federal's 'Income and Adjustments' of $X or federal's taxable income of $X - $25 100. Then substract it with our total W2 income.

 

please advise

L