I guess this dives a little more into programming, but I think it kind of depends where it falls in your cycles.
If you’re in the middle of a build, you could almost treat a sprint race as your speed work for the week and get your other long work outs (at least run and swim) during the middle of the week. Alternatively, maybe look for a way that you could take it at a moderate pace, and then once you finish go back and do the swim and run again (this is a little super league-like, but could maybe work– probably not your best bet tho).
If you’re at the end of a recovery week, that’s a bit different. Maybe dial back some of the speed work the following week? Or even just take 1-2 days of recovery afterwards to make sure everythings in the right place before getting back into it (because injuries suck).
Disclaimer: I have significantly less coaching experience than AJ, this is just what I’ve done previously…