Hey feminist.

You should break this up into two groups: the first group contains situations when you have two horses get the same position for all possible positions, and the next should be when no horse gets the same position as another.

If you have n positions (and n horses) then you can only have n - 1 instances of a tie with a position (1,2,..,n-1).

If you don't have any ties then you are basically finding the number of ways (1,2,3,...,n) can be ordered in any way possible.

You should be able to find a combinatoric identity for this and I would do the second part first before the first one.