have you tried this? Not sure of format of your times - may cause a problem

I assume you have the times in column D of "Teams" and the rows involved are 2:100

in column D of "Team Payout"

for row 2

=sumproduct((b2=Teams!b2:b100)*(c2=Teams!c2:c100)*(Teams!d2:d100))

presumably there is only one result for the rider/horse combination because this will sum all results for this combination