The humans and elves were preparing for a war and Spock didn't like that. If they really started a war his chances of finding Jim would be getting very slim and Jim's chances of getting caught in the crossfire would be too high for his liking. But as he sat there, thinking about a solution, he heard Jim's voice. Jim only said his name, but he was alive.
Spock turned around and saw his friend in the entrance. He looked exhausted, and had a wound on his forehead, but he was very much alive.
"I see that he is your friend. And he has brought some disturbing news from the dwarves. They sent for help and their cousins are coming," Gandalf said with a smile in his direction, before turning to the elves and men to discuss the matters at hand.
Spock went to Jim: "Lie down, Jim. You are tired and injured. I may not be a doctor, but I can do whatever I can to ensure it does not become worse."
"I'm fine. Besides, I walked all the way up the bloody mountain and then back down again. I was worried sick about you, Spock." Jim even managed a weak smile.
"You clearly are not 'fine'," Spock argued, and waited for Jim to counter against this statement. But instead he fell to the side, instantly fast asleep. Spock carried him to his bed (or what counted as a bed). There he would stay until Jim would wake up again.