In the 1840s, Uranus, then the farthest known planet, kept drifting off its predicted path.
Urbain Le Verrier, a French mathematician, guessed an unseen planet's gravity was tugging on it. So, from how far and which way Uranus was pulled, he worked backward to where that planet must be. He mailed its position to astronomers in Berlin.
The night his letter arrived, they pointed a telescope there and found Neptune almost exactly where he said.