Original: He visited Hampton Court Palace with future American president John Quincy Adams, at the time a diplomat in London, where they saw the Raphael Cartoons.
Simplified: He visited Hampton Court Palace with John Quincy Adams, who was a diplomat in London.