The correct response is:
They were both founded in the eighteenth century.
Both la Biblioteca Nacional de España (National Library of Spain) and the Library of Congress in the United States were established in the eighteenth century. The Biblioteca Nacional de España was founded in 1712, while the Library of Congress was established in 1800.