(NEXSTAR) — It was not until mid-week that Kyle Larson found out he would be subbing for an injured Connor Zilisch in Saturday's Xfinity Series race at Texas Motor Speedway. And even in just a few days working with the JR Motorsports crew, Larson leaned on his racing chops, surviving an ugly, messy race that had 11 cautions in it, outlasting Taylor Green in overtime to capture his second Xfinity Series win of the season and 17th of his career. "The race today was fun and we had to work on our balance a fair bit there at the beginning, and I felt like we got it to a comfortable spot there finally in the third stage," Larson said. "We had good tires there compared to the rest in front of us, and we were able to use it to our advantage for a long while." It was looking like a tight finish between Larson and Justin Allgaier in the number seven car, but Allgaier ended up on the wrong end of a wreck with Chris Wright on lap 156, bringing a promising race to an early end. "We lost a little bit of time on that pit stop, but I still thought that, you know, if the race plays out the way that it showed we were going to have a great shot at it," Allgaier said. "I'm frustrated at today. I'm frustrated myself. I'll go back and watch the film and figure out what I can do different." Larson did learn some valuable knowledge about what it takes to race on this very difficult and speedy track, and it'll certainly be useful Sunday when he returns for the Würth 400, looking to win both an Xfinity Series and NASCAR Cup Series race in the same weekend. As for the Xfinity Series, it breaks for a few weeks before heading to Charlotte Motor Speedway for the BetMGM 300. You can catch that race on Saturday, May 24, at 4:30 p.m. ET on The CW.