Elendil's height comes from the Unfinished Tales.
In the Unfinished Tales, we are given one of the only measurements of the height of a person in all the works, that being of Elendil. Elendil is described as being:
more than man-high by nearly half a ranga
Unfinished Tales: Appendix, Númenórean Linear Measures
'Man-high' in this context is a measurement based on a typical Númenórean's height, defined as two rangar or seventy-six inches. Adding a further half a ranga gives ninety-five inches, so Elendil's height was no more than seven feet, eleven inches (or 2.41 metres). This is however an upper bound as he was only taller than "man-high" by "nearly" half a ranga.
The Númenórean ranga was slightly longer than our yard,approximately thirty-eight inches, owing to their greater stature.
...
Thus two rangar was often called ‘man-high’, whichat thirty-eight inches gives an average height of six feet four inches;
ibid.
Aragorn's height comes from "LotR: A Reader's Companion"
The source for the height of Aragorn on Tolkien Gateway comes from the Lord of the Rings: A Reader's Companion edited by Hammond and Scull, which sources some of Tolkien's notes from the Bodleian Library.
Aragorn, direct descendant of Elendil and his son Isildur, both of whom had been seven feet tall, must nonetheless have been a very tall man ..., probably at least 6 ft. 6; and Boromir, of high Numenorean lineage, not much shorter (say 6 ft. 4). [Tolkien Papers, Bodleian Library, Oxford]
Hammond & Scull (eds) - Lord of the Rings: A Reader's Companion: Page 229