Śrīmad-Bhāgavatam · Text 10.12.28
Who is speaking and story frame
कृत्यं किमत्रास्य खलस्य जीवनं
न वा अमीषां च सतां विहिंसनम् ।
द्वयं कथं स्यादिति संविचिन्त्य
ज्ञात्वाविशत्तुण्डमशेषदृग्घरि: ॥ २८ ॥
kṛtyaṁ kim atrāsya khalasya jīvanaṁ
na vā amīṣāṁ ca satāṁ vihiṁsanam
dvayaṁ kathaṁ syād iti saṁvicintya
jñātvāviśat tuṇḍam aśeṣa-dṛg ghariḥ
Now, what was to be done? How could both the killing of this demon and the saving of the devotees be performed simultaneously? Kṛṣṇa, 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 Aghāsura.
Read Śrīla Prabhupāda's purport on Vedabase.io