If you are 19-years-old and your 17-year-old girlfriend's parents have given her permission to live with you how do you make certain it is legal?

Good question! It wouldn't hurt to have them provide a simple letter to that affect signed by them for her to keep at the house in case there is some need for it. The basic reality is that the parents are going to be the ones to complain about it and if they are giving permission, it shouldn't be an issue. If she is under the age of consent her parents cannot legally give her permission to live with someone else when a sexual relationship is involved. The legality of the circumstances could also depend upon the compulsory education and cohabitation laws of the state in which the relationship occurs.