The Corbomite Maneuver - S1-E11
Other mistake: When Kirk is in sickbay with McCoy he uses sickbay's desktop monitor to contact Spock on the bridge, then when Kirk is in his quarters he uses his own desktop monitor to contact Spock again. Both have the same paint dings and smudges around the console screens, revealing the same one was used during filming. (00:04:30 - 00:06:30)
Answer: Kirk was getting his physical and Dr. McCoy probably turned off communications, because if he hadn't, Kirk would have left and headed straight for the bridge, leaving McCoy irritated.