They compared against crocodilian teeth and those teeth were at a different temperature. Crocodilian teeth are known to be at a similar temperature to their environment because they are known to be cold blooded.
It is correct to say that we don't know they were warm blooded, just that their body temps were likely the given observed temperature.
i assume this means crocodiles from the same time period?
If it was environmental then you'd expect it to fluctuate over time, but they also checked it against an animal they knew to be cold blooded, if it was environmental you'd expect them to be the same, but that animal was calculated by the same method to be colder.
What environment would stay at a constant 97 degrees?
Europe this summer? /jk
They measured it. Thanks to AI, we can measure things today which would not have been possible 2 millions years ago. /s