in another example they said : bu köpek kimin ?? and now it is : kimin çayı o ?? so my question is : where and when should I put the word (kimin) ?? at the beginning or at the end ?? or both( doesn't matter) ?? so can I say : o çay kimin ?? and if yes should I say çay or çayı ?
Very close in meaning. In the first, the subject is "whose tea" Whose tea is that? In the second the subject is "that tea". Whose is that tea? It is a grammatical difference more than a difference in meaning.
Note that English changes the position of the subject in order to keep the question word at the beginning of the sentence, while in Turkish, çay is used when it is the subject but çayı when it is the thing possessed and kimin changes position.