When someone other than a parent is the custodian of a child, that custodian has full rights of parent. If they want to return the child to the parent and the parent agrees, the custodian and the parent can work together and file a consent motion for child custody modification. If the parent is not interested in regaining custody, they cannot be forced to take on custody.
Locate the proper paperwork. The parent needs to officially start the case by filing a complaint for custody modification. Then the current custodian can file an answer to the complaint. Without the complaint being first filed by the parent, there is nothing the custodian can do to give legal custody to the parent. Ask the court for the consent version of the complaint and answer.
Complete the complaint and the answer together. In the complaint the parent has to describe a change in circumstances for the custodian that occurred since the last custody order and why, in light of the change in circumstances, it would be in the child's best interests to be in the parent's custody. In the answer, the custodian has to agree with all of the parent's statements.
Attend the hearing together with the parent. At the hearing the judge will ask the custodians if they agree with the parent regaining custody. The judge may order a home inspection for the parent before making a final decision. The judge is likely to make a final decision at the second hearing if both parties are in total agreement.