This poem is taken from The Fellowship of the Ring, book II, chapter 1 (page 265):
As a matter of fact it was all mine. Except that Aragorn insisted on my putting in a green stone.
Literature Stack Exchange is a question and answer site for scholars and enthusiasts of literature. It only takes a minute to sign up.Sign up to join this community
This passage comes right after Bilbo's poem about Earendil the Mariner, the details of which came from Bilbo's familiarity with the story, and presumably his research into the history of the Elves (Earendil was Elrond's father). Before Bilbo sings it out, he goes to a corner with Aragorn to work on the poem together and polish it.
After the reading, Bilbo challenges the listening Elves to tell which parts were his and which added by Aragorn, which they fail to do:
"But really we cannot answer your question at one hearing!"
`What!' cried Bilbo. 'You can't tell which parts were mine, and which were the Dúnadan's?'
'It is not easy for us to tell the difference between two mortals' said the Elf.
Bilbo then gives Frodo the answer, saying that the only line that Aragorn added was
upon his breast an emerald (an emerald being a green jewel), the last line in the second stanza, which was important for Aragorn to add.
The reason Aragorn wanted it put in is that in addition to this green stone - the Elessar, or Elfstone - there was a second, similar green stone, also named Elfstone, that was given by Galadriel to her daugher Celebrian, who then gave it to her daughter, Arwen, who then gave it to Aragorn, thus fulfilling a prophecy that the Elfstone will help restore the Dunedain to Gondor. Aragorn, knowing this, wanted to preserve and enhance this relationship between his stone (he was later crowned King Elessar, or Elfstone) and Earendil, to enhance the link between his people and the elves.