ENOfficial
Yahya b. Yazid al-Huna'i reported: I asked Anas b. Malik about shortening of prayer. He said: When the Messenger of' Allah (ﷺ) had covered a distance of three miles or three farsakh (Shu'ba, one of the narrators, had some doubt about it) he observed two rak'ahs.
Source: sunnah.com
Other translations
Arabic
وَحَدَّثَنَاهُ أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَمُحَمَّدُ بْنُ بَشَّارٍ، كِلاَهُمَا عَنْ غُنْدَرٍ، - قَالَ أَبُو بَكْرٍ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، غُنْدَرٌ - عَنْ شُعْبَةَ، عَنْ يَحْيَى بْنِ يَزِيدَ الْهُنَائِيِّ، قَالَ سَأَلْتُ أَنَسَ بْنَ مَالِكٍ عَنْ قَصْرِ الصَّلاَةِ، فَقَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم إِذَا خَرَجَ مَسِيرَةَ ثَلاَثَةِ أَمْيَالٍ أَوْ ثَلاَثَةِ فَرَاسِخَ - شُعْبَةُ الشَّاكُّ - صَلَّى رَكْعَتَيْنِ .
sunnah.com