The past tense of rack brains is racked brains.
The third-person singular simple present indicative form of rack brains is racks brains.
The present participle of rack brains is racking brains.
The past participle of rack brains is racked brains.