Valmiki Ramayana Bala Kanda Sarga 42 Shloka 7
Original Shlokaतस्य चिन्तयतो नित्यं धर्मेण विदितात्मन:। पुत्रो भगीरथो नाम जज्ञे परमधार्मिक:।।1.42.7।।
1 source checked for this shloka
विदितात्मन: wellknown for his intelligence, धर्मेण with righteousness, नित्यम् constantly, चिन्तयत: while reflecting, तस्य for him, भगीरथो नाम named Bhagiratha, परमधार्मिक: highly virtuous, पुत्र: son, जज्ञे was born.
As Dilipa known for his knowledge of the soul constantly reflected righteously on (this matter of Ganga), a highly virtuous son named Bhagiratha was born to him.