I think I must be missing something...
Assume that A is driven clockwise and C is held stationary
For every tooth's worth of rotation of A, B must also rotate by a tooth, which will cause it to push back against C, moving it anticlockwise.
Note that every tooth's worth of rotation of A will cause B to move back One tooth's worth against C.
For B to move a full circle round the inside of C, the number of teeth's worth of rotation of B, and thus also the number of teeth's worth of rotation of A must equal the total number of teeth in C.
Thus for one rotation of D, A must rotate TC/TA times.
This is close to your desired answer, but...
__________________
~\o/~
