Barclays interview question

5 horse race problem