The following is from Hidaayah and Fathul Qadeer, there was more daleel for the subject, but i just translated this portion in the meantime.
( وَيَقْنُتُ فِي الثَّالِثَةِ قَبْلَ الرُّكُوعِ ) وَقَالَ الشَّافِعِيُّ رَحِمَهُ اللَّهُ بَعْدَهُ لِمَا رُوِيَ { أَنَّهُ عَلَيْهِ الصَّلَاةُ وَالسَّلَامُ قَنَتَ فِي آخَرِ الْوِتْرِ } وَهُوَ بَعْدَ الرُّكُوعِ .
وَلَنَا مَا رُوِيَ { أَنَّهُ عَلَيْهِ الصَّلَاةُ وَالسَّلَامُ قَنَتَ قَبْلَ الرُّكُوعِ } وَمَا زَادَ عَلَى نِصْفِ الشَّيْءِ آخِرُهُ
(And you will make qunoot in the third rakaat before ruku’) Imaam Shaafi’i Rahimahullah says you make it after ruku’ because of the narration: {that Rasoolullah Sallallahu Alayhi Wa Sallam made qunoot in the ending of his witr} and that is after ruku’.
And our proof is the narration {that Rasoolullah Sallallahu Alayhi Wa Sallam made qunoot before ruku’}, and what comes after the half of something is its end*
*That is in reply to the narration of Imaam Shaafi’i Rahimahullah.
قَالَ النَّسَائِيّ وَابْنُ مَاجَهْ : حَدَّثَنَا عَلِيُّ بْنُ مَيْمُونٍ الرَّقِّيِّ ، حَدَّثَنَا مَخْلَدُ بْنُ يَزِيدَ عَنْ سُفْيَانَ عَنْ زُبَيْدٍ الْيَامِيِّ عَنْ سَعِيدِ بْنِ عَبْدِ الرَّحْمَنِ بْنِ أَبْزَى عَنْ أَبِيهِ عَنْ أُبَيِّ بْنِ كَعْبٍ { أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ يُوتِرُ فَيَقْنُتُ قَبْلَ الرُّكُوعِ } انْتَهَى لِابْنِ مَاجَهْ .
Imaam Nasaa’i and Imaam Ibn Maajah Rahimahumallah narrates [translators note: chain omitted] from Hadhrat Ubay bin Ka’b Radhiallahu Anhu {That Rasoolullah Sallallahu Alayhi Wa Sallam used to make witr and he used to make qunoot before ruku’} end quote of Imaam ibn Maajah Rahimahullah.
وَلَفْظُ النَّسَائِيّ { كَانَ يُوتِرُ بِثَلَاثٍ ، يَقْرَأُ فِي الْأُولَى سَبِّحْ اسْمَ رَبِّكَ الْأَعْلَى ، وَفِي الثَّانِيَةِ قُلْ يَا أَيُّهَا الْكَافِرُونَ ، وَفِي الثَّالِثَةِ قُلْ هُوَ اللَّهُ أَحَدٌ ، وَيَقْنُتُ قَبْلَ الرُّكُوعِ } انْتَهَى .
And the wording of Imaam Nasaa’i {Rasoolullah Sallallahu Alayhi Wa Sallam used to make three rakaats witr, in the first rakaa’ah he (Sallallahu Alayhi wa sallam) read Surah A’laa, in the second rakaa’ah Surah Kaafiroon, and in the third Surah Ikhlaas, and he (Sallallahu Alayhi Wa Sallam) make qunoot before ruku’} end quote.