Elrond had been seeking refuge from the trials of the war when he found the animal. He was seeking an afternoon's solitude and rest when he heard a strange noise. His sharp ears and is training as a healer identified the sound as a creature in pain. Following it, he found a small brown lump huddled under a tree. Bill, Sam's beloved pony, had somehow found its way back.
Gathering his robes, Elrond knelt at the beast's side, laying a hand on it gently. There was magic on the animal, and Elrond recognized it as Gandalf's spellmaking. Reaching out slowly, he touched Bill's mind and recoiled with shock when he was bombarded with countless images and vivid memories. Breathing heavily, he began to sort them out, his hand stroking Bill's neck and shoulder as he kept his mind locked away. They couldn't take him into Moria, so Gandalf had bespelled him to return here. The journey had been fraught with peril, however, and Bill bore the scars and wounds of battles no Pony should have to fight. "Hush, little one," Elrond murmured as he would to a distressed child. "You have returned, and you will be healed."
The pony's head rose, intelligent brown eyes meeting Elrond's. Reaching up to scratch behind Bill's ear, Elrond smiled when he felt the rough scratching of horse whiskers on his neck. "Yes, you'll be safe here now," Elrond murmured in answer to the softly whuffled question in his ear. "I'll take care of you, little Bill," the Elf Lord promised.
Gradually, Elrond encouraged Bill to stand and was able to inspect his wounds. "You'll live, little one," he murmured into a soft brown ear as he scratched under the pony's chin. "Let's get you to the stable so I can tend your wounds."
Some time later, Elrond had the pony settled and asleep. When he didn't respond to normal methods, Elrond had resorted to giving him a small measure of warmed wine to drink. It seemed to do the job and Bill's head had become heavy on Elrond's legs. Carefully moving out from under the warm burden, Elrond had stood and left the stable, intending to return the following day.