If you guys can come to an agreed order, you generally just have to file a petition and then prove up an agreed order. This does involve going to court but it's generally pretty quick and painless so long as you know the requirements for a proper custody order. I'd recommend consulting a local attorney.
As long as the 13 year old is being properly cared for by you consistent with her best interests, including attending and passing classes in school, staying out of trouble, being fed and clothed, even if based only on an agreement between you and the Mom, there is no need per se for a court order . But there are a variety of reasons that you may want orders. I would suggest you consult your local family law attorney to discuss the arrangement in detail and learn whether you should or should not be concerned about obtaining orders. Good Luck. Please check the “helpful” button if you found this helpful Thank you.
Please note that this answer does not constitute legal advice, and should not be relied on, as each situation is fact specific, and it is not possible to evaluate a legal problem without a comprehensive consultation and review of all the facts and court pleadings filed in the case. This answer does not create an attorney-client relationship.
If she wants to live with you and mom agrees, going to court is no big deal. Look on this website for an attorney in your county to help you. At least, I'd talk to an attorney about your options so you know the law & understand what is going on. You don't want to be blind-sided. If mom is very ill and could potentially pass away, I would want to have an attorney around, in case something "bad" happens. I hope I never need an attorney, but it is nice to know where to call an attorney when I need one :)