The appointment of a guardian ad litem shall be made by the court in which the suit is pending, or by the judge thereof in vacation, upon the written request of the infant defendant, if of the age of fourteen years or more, or, if such infant be under said age, on the written request of a relative or friend of the infant, and on the written consent of any competent person proposed as guardian ad litem, and such request and consent shall be filed in the office of the clerk of the court before any answer by such infant shall be filed.
§ 507.200, RSMo