The younger Joey remains attached to the teat from which it receives its milk for the period of nine months until it leaves the pouch. So that would be teat from which milk suitable for the newborn is available (reference 1 and reference 2). The older Joeys also have an incredible sense of smell by which it can detect the teat from which it gets the milk it requires but it stands to reason that they cant get milk from the teat to which the younger joey is attached. (reference)