krtyam kim atrasya khalasya jivanam
na va amisam ca satam vihimsanam
dvayam katham syad iti samvicintya
jnatvavisat tundam asesa-drg gharih
krtyam kim—what to do; atra—in this situation; asya khalasya—of this envious demon; jivanam—the existence of life; na—there should not be; va—either; amisam ca—and of those who are innocent; satam—of the devotees; vihimsanam—the death; dvayam—both actions (killing the demon and saving the boys); katham—how; syat—can be possible; iti samvicintya—very perfectly thinking about the subject matter; jnatva—and deciding what to do; avisat—entered; tundam—within the mouth of the demon; asesa-drk harih—Krsna, who has unlimited potency, could understand past, future and present.
Now, what was to be done? How could both the killing of this demon and the saving of the devotees be performed simultaneously? Krsna, being unlimitedly potent, decided to wait for an intelligent means by which He could simultaneously save the boys and kill the demon. Then He entered the mouth of Aghasura.
Krsna is known as ananta-virya-sarvajna because everything is known to Him. Because He knows everything perfectly well, it was not difficult for Him to find a means by which He could save the boys and at the same time kill the demon. Thus He also decided to enter the demon’s mouth.
Link to this page: https://prabhupadabooks.com/sb/10/12/28