Wishing he'd been a bit quicker AT thinking up / TO think up some story, he left the room.
What's the difference in anything?
at thinking up' is correct.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.