The Prophet ﷺ said: If one enters a horse with two others when he is not certain that it cannot be beaten, it is not gambling; but when one enters a horse with two others when he is certain it cannot be beaten, it is gambling.
عَنِ النَّبِيِّ ﷺ قَالَ مَنْ أَدْخَلَ فَرَسًا بَيْنَ فَرَسَيْنِ يَعْنِي وَهُوَ لاَ يُؤْمَنُ أَنْ يُسْبَقَ فَلَيْسَ بِقِمَارٍ وَمَنْ أَدْخَلَ فَرَسًا بَيْنَ فَرَسَيْنِ وَقَدْ أَمِنَ أَنْ يُسْبَقَ فَهُوَ قِمَارٌ