Make the tempo of the song steady using the tempo track

Hello guys,
I’ve created a tempo track that follows the audio I’m working on which wasn’t recorded using a metronome
To make the timing of it steady, I’ve used the “set definition from tempo” and then I’ve dectivated the tempo track and set the tempo to 164BPM…therefore the whole song plays at 164bpm

The problem is that the original song starts at 164bpm but at bar 18 goes to 240bpm…
Now as I mentioned before…due to my settings the whole song plays at 164bpm and I’m not able to change the tempo at 240bpm at bar 18 since the tempo track is deactivated…is there any way to make this happen?

In other words I want the audio track to follow the metronome of the project steady at 164bpm and then at 240bpm from bar 18

update:

at the end I’ve decided to split the audio track in 2 parts; I’ve exported the first part at 164bpm and then 2nd part at 240; After that, in a new project I’ve imported and glued the two parts together …and I’m done… let me know if there is an easier method

the only thing that bores me is that there is an audible audio gap between the two imported splitted parts even though the locators were properly set…and since the parts are next to each other I can’t solve it with a crossfade…
To avoid this I thought I may set the locator a little further than I need per each part in order to be able to do a crossfade between the them and glue them back together but this could lead me to some timing problems… any hints?

anyway, this audio track is just a guide track and at the end of the job will be removed so the audio gap in this case is not a big deal

update:

For whom hwo may concern, I solved it
Once you used the “set definition from tempo” you can create a secondo version of the tempo track and do the adjustments you need with no worries