You would answer "No" to the question "Did you make money in any other state?" You did not worked in MA.
So what you need to do is file a non-resident MA tax return to claim those MA state taxes back. New Hamphire being
a state where you pay taxes on dividends and interest would not be affected.