What does the Doctor mean when she says that the Ux are found on 3 planets but there are only ever two of them at a time? How can they be on 3 if there are only ever 2 of them?
The Doctor is aware, on some level, of a large span of history and constantly makes statements of things not just that are occurring at the given time they're in, but that apply generally speaking over the course of history, and her knowledge is voluminous but incomplete. For example, in "Demons of the Punjab" she knew the Thijarans reputation as a race of assassins...
but she was not aware that at that time, they were peaceful after their planet was destroyed.
So, when she says of the Ux,
You're kidding. The Ux? As in the duo-species, only ever two of you? Lifespans of millennia? Only found on three planets in the whole universe?
The logical default assumption (given 'only ever two of you') is that she means they're only found on three planets in the whole universe, at least to her knowledge, over the course of their history.
We know the Ux have vast reality manipulation powers. Which means that, should they need or desire to make it happen, the two Ux in existence could simply move to other planets (although it's possible only certain planets meet whatever needs they have, hence them only appearing on three... or maybe they just don't like to move very often and the third planet they lived on is the one they stopped existing on... being a species of only two is a precarious situation).
There is no contradiction in the Doctor's statement.
It does not say that at any time there are only two Ux and those two exist on three planets.
It says that at any time there are only two Ux and throughout history, the Ux were found on only three planets. It could be that:
- Each pair of Ux traveled around visiting only those three planets.
- Some pairs of Ux lived on Planet 1, some on Planet 2 and some on Planet 3.
- Some combination of those possibilities.