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.
Nina L. Kaufman is an award-winning business attorney, author and speaker. For more than 15 years, she has successfully navigated thousands of small businesses through the legal hurdles they face in starting and running their companies. Under her
AskTheBusinessLawyer.com brand, she reaches thousands of entrepreneurs and small business owners with her legal services, professional speaking, information products, and
LexAppeal weekly ezine.