Hand guns in DC must be registered after owner in DC takes an on line test. When being transported, they should be in a locked box. Presumably locked in the trunk would be appropriate for a long gun. Given the theft rate from cars, leaving a gun in plain sight in a vehicle is insane. I don’t know the rules on long guns, so here is a link.
https://mpdc.dc.gov/page/firearm-registration-general-requirements-study-guide
Having now read the rules for transport, it appears both weapons should have been unloaded, locked in the trunk, or locked in a container if no trunk was available. Also the person should have been able to legally own the weapon wherever they came from and in DC.