All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Many scholars of Tafseer are of the view that the pronoun in the expression {we feared} in the verse in which Allaah says (what means): {…and we feared that he would overburden them by transgression and disbelief} [Quran 18:80] refers to Al-Khidr . Therefore, there is no confusion as regards the meaning. Al-Qurtubi chose this meaning.
However, some scholars are of the view that the pronoun refers to Allaah and that it means ‘we knew’. Al-Qurtubi said in Al-Jaami’ li-Ahkaam Al-Quran, "The saying of Allaah: {…and we feared that he would overburden them by transgression and disbelief}; it was said that these are the words of Al-Khidr ; the context proves this, and this is the view of many scholars of Tafseer ... Allaah permitted him to make Ijtihaad (personal reasoning) to kill a soul for such a reason. It was also said that they are the words of Allaah and that Al-Khidr expressed this on behalf of Allaah."
At-Tabari said, "Its meaning is ‘we knew’, and this is also what Ibn ‘Abbaas said, i.e. ‘we knew’. This is like the metaphor that is used for knowledge with the word fear in the saying of Allaah (which means): {…unless both fear that they will not be able to keep [within] the limits of Allaah.} [Quran 2:229]"
For more benefit, please refer to fatwa 314002.
Allaah knows best.