Dad and Grandma need to consult a family lawyer. The biological parent has priority under the law, unless parental rights are terminated by a court. Given bio mom's track record, that might be possible in this case, but courts are extremely reluctant to do that. Dad and Grandma might seek permaent custody through the family law court, or they might seek guardianship thru the probate court. The fact that Dad and Grandma has had the child for five years is a very strong circumstance. Dad and Grandma will definitely need an attorney to sort through this and to determine what rights they can assert. Any time custody or guardianship of a minor is involved, the presumptions are in favor of the biological parent, and any case made on behalf of Dad and Grandma will be facts and circumstances intensive. This will be an expensive court proceeding, and they will need a good, local family law attorney.