One remarkable thing about this to me is that Uranus passing Neptune like this only happens once every 171 years (playing out over about 40 years or so as shown). If Uranus had been discovered just a few decades later (than 1781), the next chance to discover Neptune this way wasn't until the 1990s!
Animation of the motions of Uranus and Neptune between 1805 and 1845. The connecting line between the two is traced as well. Initially, Neptune is pulling Uranus forward, after 1822 or so pulling him back a little back. The resulting changes in Uranus's motion led to the discovery of Neptune. 🧪🔭⚛️