Almost all logic problems can benefit from sketching out the problem, but it's especially helpful for this problem.
Before we sketch out our solution, let's take a moment to explore what the naive solution would be. We could race a horse against each other horse until it A) lost, or B) went undefeated. Even in this "best case" scenario, we'd have 24 races before establishing the fastest horse.
We should use the information we're given! We have 5 tracks, so there's no need to race two horses at a time. We'll revise our earlier strategy and perform 5 races of 5 horses each.
At the conclusion, we have 5 winners of those individual races. We'll label them A - E. We know the fastest horse of each group, but there's no comparative information between groups.
In order to draw conclusions between the groups, we need to perform another race with the winning 5 horses. Let's say they finish in alphabetical order:
1st: A1
2nd: B1
3rd: C1
4th: D1
5th: E1
We now know the fastest horse, A1, and we have some information about how the groups relate to each other. Do we have enough information to solve the puzzle?
Let's eliminate some horses, metaphorically, and find out. We'll sketch out the groups based on their lead horse and the numbers 1-5.
To start we had 25 horses:
A1 A2 A3 A4 A5
B1 B2 B3 B4 B5
C1 C2 C3 C4 C5
D1 D2 D3 D4 D5
E1 E2 E3 E4 E5
We found the 5 fastest of each group:
A1
B1
C1
D1
E1
We can eliminate the 4th and 5th place finishers of each group:
A1 A2 A3
B1 B2 B3
C1 C2 C3
D1 D2 D3
E1 E2 E3
In fact, we can eliminate D and E groups entirely! The fastest horse of that grouping wasn't fast enough to place in the top 3 of our "winner's race".
We can also eliminate A1, that's the fastest horse so no need to race any longer.
A2 A3 A4
B1 B2 B3
C1 C2 C3
Can we eliminate more?
B grouping's leader came in second place in the "winner's race". B3 can't be faster than 4th place overall because it came in 3rd in its grouping and A1 is faster than B1.
We can use this same reasoning on C grouping and eliminate C2 and C3. C grouping's leader came in third in the "winner's race", the second place in C group can't hope to be better than 4th because it finished behind C1, which finished behind 2 others.
That leaves us with the following horses:
A2 A3
B1 B2
C1
One more race and we've found our three fastest horses. A1, and the first and second place finishers of this runner-up race.
To recap, we needed 7 races altogether. At each step, we eliminated as many horses as we could with reasoning and only raced when we had no other options.