I think it was a panic, spur of the moment decision, but still, that's your job as HC. Have to be thinking one step ahead. You ideally want to leave Mahomes less than 10 seconds. Seriously, even 15 can be too much.
Get up to the line, keep the timeout in your pocket, sneak with Mayfield, would have gotten much closer to that target time. It's also nice to have the timeout in your pocket in case something happens with a running clock and you need it to stop the clock and avoid a 10 second runoff.
Had they scored with 10 seconds left or so, they would probably have gone for 2. Or maybe not, but I think it would have been the more logical call with less time remaining when you're pretty sure the 2 is either going to win or lose you the game.