That first sentence gave me some trouble as well. I ended up breaking it down like this:
暑い中こんなに: this does indeed seem to give a location for where the verb フル回転させて is taking place. The context seems to support this, but we need to read the next part of the sentence for it to make a bit more sense
頭をフル回転させて: we seem to have a similar translation here: Nishikata is making his head run at full operation. Note that this is the て-form, which seems to make it more part of a list of actions than something that modifies 高木さん directly.
高木さんと戦っている: the と here does indeed seem to simply mean “with”, so he’s battling with Takagi-san.
のに: I ended up translating this one as despite (that), in reference to the previous sentence, which seems to be the other way around from the usual sentence order. I’m taking it to refer to the entire text bubble, so not just the 戦っている. I’m not too sure about it though, but it does sound plausible enough in context
If we put it all together we get something like:
Despite that, I’m making my head run at full operation in this kind of heat and battling with Takagi-san.
In the frame, Nishikata seems to be staring out over the other people in the pool, looking at them having fun, then complaining to himself that instead of swimming he’s stuck on the side of the pool in a mind-game with Takagi while it’s hot outside.
I have no idea if I’m right though, it took me a few tries to make sense of this one as well