How can a father get custody of there child?

Parker

My bf is looking to get full custody of his daughter. Honestly, I believe its hard to say they live in a different state and at times she makes it difficult for him to see her. Last week he drove 10 hours round trip to get her just to see her for 1.5 days and the mom wanted the daughter home. If it helps he lives in MD.