The Core rulebook covers buying fake licenses but is there any mention in RAW on how much a legal license costs?
No, there's no RAW mention of cost.
This isn't surprising though: Shadowrunners generally don't use legal licenses because of the overbearing bureaucratic requirements they place on the character, as well as the ease with which they allow authorities to track you. Page 68 of the core book, for example, mentions that magic licenses give permission for authorities to search the character's home at any time. This is compounded with the fact that this license will be tied to the character's fake SIN, which will likely draw scrutiny from the authorities.
The only reference I could see to legal licenses said "pay a small fee". It seems to me that this is an arbitrary GM decisions for the various locations if you want to force them to pay for something that only matters once in however many in game years it's required for renewal. If you want, you can say that this sort of thing would be factored into their Lifestyle costs, since it's on the up and up
There is no given cost in Raw as far as I'm aware. The only thing that you could do to get close would be to take the "Buying The Basics" (p.252) section out of Run Faster and then do your research how much such a license would cost today and then try to convert with the help of the tables out of said section. Of course that does not work for cyberware or magic but it might give you a direction. DocRattie has a good point that most legal licenses would be out of your lifestyle or your past so you would not need to pay for it at all. But i would be careful for just handing out licenses without a good justification. In my games for example everyone who has a real sin also has a real driving license since I would assume most people would have one. But I wouldn't give licenses for things like weapons, cyberware or magic without a very good reason. For Example: I had a player who asked if he could have a real magic license with his sin to which I asked him how he avoided being, possibly forcefully, hired by a corporation since they are always looking for new mages and a full mage with magic 6 is a promising asset. Which was basically asking "I can give you your magic license but why don't you take the wanted quality for that?". Always keep the old Shadowrun Slogan in your head: "Everything has a price."
The cost of a legal license should be covered by your lifestyle, as that includes stuff like rent and taxes.
Besides that, you can obviously come up with something cool as a GM to get it into the game. Something like: "You need to do this run to delete the tax requirements of your license."
Both lifestyles and licenses are attached to a SIN (System Identification Number, your personal ID), fake or not. The core rulebook (p. 367) defines Licenses like this:
A basic SIN allows a person to function within the most basic parameters of the law. If a person wants to operate outside these very confining strictures, they need special permission in the form of a license. What actions or items require a license vary widely with the laws of the country, but there are some common similarities shown in the Common Licenses Table below. Acquiring a license (legally) is, again, dependent on the laws of the country. For the most part, acquiring a license involves making an application, paying some sort of fee, a SIN check, and possibly passing one or more certification, testing, or training programs. The exact details of acquiring a license are left up to the gamemaster, but government bureaucracies are notoriously slow and frustrating.
And later in the book we are told the differences between legal and illegal licenses and permits:
Licenses and permits can be obtained through legal channels, as long as you’re a solid citizen with a legal SIN—of course, that goes for shadowrunners with fake SINs acquiring fake licenses, too. A fake license is connected to a fake SIN, and if one of them is exposed, the other becomes worthless.
This means that a license, fake or not, is as good as the SIN that it is connected to. So the cost of such an illegal license shouldn't be very different from a legal license because it really doesn't matter if your SIN has a bad rating that can easily be verified by the cops.
You do not want a legal SIN or licenses if you are a shadowrunner
Ultimately, you do not want to buy legal licenses if you are going to use it for illegal actions, you are bound to get caught sooner or later and you won't be able to discard your SIN, you will have to hack into government security and burn your legal SIN from the system, which could be extremely difficult.
If you use your real SIN when you meet with a Mr. Johnson, there's a good chance that he now knows exactly who you are and where to find you if things go badly or he decides to double cross you (something that never happens in shadowrun). If you practice any illegal actions and they research on the public grid for camera feed or traffic, they will eventually trace it back to you. If you leave a drop of your blood on a run, they might be able to trace your SIN through your DNA.
If you happen to pay for your apartment's rent using your legal SIN and do something illegal that puts your face on Knight Errant's database of wanted criminals, eventually their investigators will cross the data and find someone who looks a lot like you, and guess what, they are the same person!
So, even if you wanted to use a legal SIN to do legal stuff, like take a cab, buy food, go to a cafe, you do not want to have your DNA, fingerprints, retina, and especially your face registered on official government databases. It's a security flaw beyond imagination to your character and you are bound to get caught sooner or later if you do that.
I struck a deal with my GM for my concealed Tiffani Needlers, 500 nuyen for the gun license, 500 for concealed carry and 200 for the license to buy munitions for it. Everything is restricted about the gun, they did cost me around 2600 nuyens and 2200 for legal papers, for both. The reason we struck that deal is that I am playing a face with a "day job" for Horizon and a legal life, so I can't just risk going around with illegal things.