either black zetsu told him, or quite possibly he manipulated rinnegan usage to read the tablet or both. as for choosing the 9tails overall, it could be due to its larger power, yes i know early on it was said the number of tails has nothing to do with their power, but if they must be collected in order, then obviously there is some form of significance, it wouldnt be the first time kishi has contradicted himself from one issue to another several hundred chapters down the way. Or it could be referencing japanese lore more than anything, given tobi's ultimate evil nature and ill will toward all humanity, his personality very much so coincides with the fox demons of japanese mythology so he could merely be drawn to his tailed beast equivilent.