In NY, part-year residents file a return with two columns, one with full-year totals and one with NY-only totals. You then compute the tax on the full-year amount, and prorate it according to the fraction of income earned in NY. For example, if you earned $40,000 in MD and $20,000 in NY, your tax due is 1/3 of the NY tax on $60,000. Thus you need both numbers (the $20,000 and the $60,000) for your NY return, and you should see both on the form created by TurboTax.
MD doesn't work this way; part-year residents file a tax form which only lists income earned while you were a MD resident. In the example above, your MD tax would be the MD tax on $40,000. (MD nonresident income does work the same way as NY part-year resident income; if you are a NY resident all year but earn $40,000 in MD and $20,000 in NY, your MD tax is 2/3 of the MD tax on $60,000.)