TT recommends doing the return for your former state first. See these instructions:
How do I file a part-year state return? (intuit.com)
Retirement income is taxable only by your State of Residence at the time you receive it. So once you're residents of MD, your retirement income is no longer taxable by NM.
There will be no credit on your MD return for the taxes paid to NM. "Other state credits" are granted only when you have income taxed by both states. Example: a NM resident who works in AZ.
**Answers are correct to the best of my ability but do not constitute tax or legal advice.