Yahya bin Yazid (may Allah have mercy on him) says that I asked Hazrat Anas (may Allah be pleased with him) about the shortened prayer (Qasr). He replied: When I used to set out towards Kufa, I would perform only two rak'ahs until I returned. And when the Prophet (peace and blessings be upon him) set out for a distance of three miles or three farsakhs, he would perform two rak'ahs.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 12313