Maryland is quite restrictive and all handguns (private sale and otherwise) must be run through a dealer or the state police for a background check. They have a list of rifles as well and the AR's, I believe, are on that list. So you must go through a dealer or State Police.
Any out of state handgun purchase must be routed through a Maryland FFL dealer. I am not sure about long gun requirements as in most states, you can purchase long guns if you are not a resident.
I would check the state requirements. I am not sure about the 7-day waiting period. Call the State Police and they should tell you straight.