You can ask another company to transfer their name to you...but unless you have a carrot (money) or stick (a strong legal basis for a lawsuit) to offer, you won't likely get very far.

Secretaries of State generally register names on a first come, first served basis, so if you came in second, too bad. A company that had already registered a name has no obligation to turn over their name, and chances are they may not want to if they've already invested time and money into building their brand and name recognition.

That said, you may be able to register a name that's similar -- for example, "Jane’s Desserts" instead of "Jane’s Cookies" -- so you may be better off trying to come up with a new name and avoiding the complications of getting the other company to part with something that's dear to them.