It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: Whoever includes a horse between two horses in a race, about which it is not certain that it will advance, then there is no harm in it. But whoever includes such a horse about which it is certain that it will advance (and win), then this is gambling.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 10557
Hadith Gradingحکم دارالسلام:إسناده ضعيف، سفيان بن حسين ضعيف فى الزهري