Let [itex]v[/itex] be the components of a vector [itex]\mathbf{v}[/itex] with respect to your old basis (frame). Let [itex]v'[/itex], "v prime", be the components of [itex]\mathbf{v}[/itex] with respect to your new basis. If the old and new components are related by
[tex]v'=Av,[/tex]
then, in particular, the components of the vectors of the old basis, written as columns of a matrix, [itex]B[/itex], are related to their own representations, with respect to the new basis, [itex]B'[/itex], by [itex]B'=AB,[/itex], so that [itex]A^{-1}B'=B[/itex]. But the components of any basis vectors, with respect to themselves, comprise the identity matrix! So [itex]A^{-1}B'=I[/itex], and so [itex]B'=A[/itex]. The components of your new basis, with respect to the old, are [itex]A^{-1}[/itex], since [itex]A^{-1}v'=Iv=v[/itex].
(Note also: It's a property of rotation matrices that [itex]R^{-1}=R^T[/itex], where [itex]R^T[/itex] means the transpose of [itex]R[/itex].)
I'm not sure if the following is what you meant: but if the columns of T(x,y,z) contain the components of your new basis vectors, with respect to themselves, and T(X,Y,Z) the components of your old basis, with respect to themselves, then, and your R is my A, then your equation is correct, and says
[tex]I=R^{-1}IR=R^{-1}R.[/tex]
I didn't understand you final question.