I could see the cogs turning as he calculated strategies...I got there first.
the wheels in his brain were turning. 
mnli hypothesis: the wheels in his brain were turning.  premise: I could see the cogs turning as he calculated strategies...I got there first.