Your firearms should cost as much as their ranged weapon equivalent.
That is to say, if firearms exist in your world they either cost the same as typical equipment and are not stronger, or they cost more because they are significantly stronger.
My suggestion is that you make a ranged weapon (magical or mundane) that functions mechanically the same as you would want your firearm to function, and then use that items estimated price per the dmg.
Personally, I would recommend you decide how rare these pieces of technology be and go from there.
Mundane Items (1-100g) pretty much anyone they encounter thats anybody remotely important would be carrying (personally would be pistols and shotguns)
Uncommon (100-500) would be maybe seen frequently but not everywhere. (over 50%. personally would be automatic rifles, though I would give both a +1)
Rare (500-5000) would be modified versions of these. maybe a pistol with burst fire and +2, or check out players handbook for some magical properties you can re flavor (incendiary ammo maybe). Low percentage of people have these. Most of which are serious military types.
Very Rare(5000-50000) would start futuristic weapons (laser pistol, laser rifle, antimatter in its base state) A special forces division maybe has a stock of these. a couple scavengers stumbled upon some here and there. Most people have never seen one and aren't necessarily even able to articulate what they can do.
Legendary would be any very rare with any modifications. (50000-500000)
Legend says that a man named Jerry lives in the cannibal mountains. He learned how to make new technology thats wild and dangerous.
Personally, your level 1-5 players would probably not buy any of these futuristic weapons. They would stumble upon one, maybe.
So personally revolver probably 50g, pistol 75, shotgun rifle etc 100.
Advanced scope gives +1, boosts cost by 100 on a pistol/revolver and 200 on a rifle. maybe something like a grenade launcher on a rifle can cost upwards of 300.
Incendiary rounds, sabo rounds (pierce walls), night vision, heat vision boosts weapons costs upwards of +2k for a pistol, +3k for a rifle.
Laser Pistols (20k, laser rifles 25k, antimatter rifle 30k)
Any of those with modifications are easily 100k+