A friend just did this so I know it works.
If you can't make one of the NH "Proctored" exams in person, the MD boating NASBLA certificate can be completely completed online, there is no need to show up in person to take the exam.
Now, this may be controversial (and I'm sure it will be), but it's allowed and the MD boat-ed certificate is NASBLA certified and is therefore allowed in NH.
start here:
https://www.boat-ed.com/
Then click MD:
https://www.boat-ed.com/maryland/
Pay your fees, learn the material, then pass the final exam.
Note that I would strongly recommend that you also review the NH material to be familiar with the NH specific rules. This may also be a good idea for anyone that wonders what the exams are like, or if you would like to refresh yourself:
https://www.boat-ed.com/newhampshire/
Good luck!