How can they be sure the two planets are orbiting at exactly the same distance from the sun? I know that would present an even more remarkable set of circumstances, but this universe is remarkable.
Technological advancement has made extrasolar planets discoverable, and estimates of their mass and other characteristics are based on continued info gathering. Among the things that get gathered are more planetary discoveries, which make it possible to make better estimates of the masses of all the bodies. This particular discovery relied on the regular interruptions of the star’s light (it dims just a little as each of these “twin” planets occult the star).