There's a total of 3 races in which you need to beat Imelda Reyes "Best Time". During the races ensure you don't miss any rings and collect the yellow speed bubbles for a burst of speed. The target times are fairly lenient and you should achieve them even with mistakes. If you fail to beat the target time you can just revisit the race starting line to try again. See below for more detail on quest names and when the races unlock:
Race #1 Questline: "Flight Test."
Unlocked After Main Story: "The Room of Requirement."
Required: Buy A Broom (600) from Albie Weeks - Spintwitches Sporting Needs Shop (Hogsmeade).
Race Location: Hogwarts "Quidditch Pitch."
Target Time: 2:20.
Race #2 Questline: "Sweeping the Competition."
Unlocked After Main Story: "The Elf, The Nab-Sack, and the Loom."
Required: Purchase Broom upgrade (1,000) from Albie Weeks - Spintwitches Sporting Needs Shop (Hogsmeade).
Race Location: Outside "Irondale."
Target Time: 2:26.
Race #3 Questline: "The Sky is the Limit."
Unlocked After Main Story: "It's All Gobbledgook."
Required: Purchase Broom upgrade (4,000) from Albie Weeks - Spintwitches Sporting Needs Shop (Hogsmeade).
Race Location: Southern tip of the "South Clagmar Coast."
Target Time: 2:42.
Shortly after completing all Albie Weeks quests he'll sell a legendry upgrade for your broom at a price of 7,500.