Here's how I would proceed: first, note that for matrix products $A(t)B(t)$, we have a generalized Leibniz rule for derivatives, viz.,
$(A(t)B(t))' = A'(t)B(t) + A(t)B'(t)$;
this is in fact quite easy to prove by looking at the formula for the $ij$ entry of $AB$ (from here on out I'm dropping the explicit functional notation $A(t)$ etc. in favor of the implicit usage; thus $A(t)$ becomes simply $A$ and so forth):
$(AB)_{ij} = \sum_k A_{ik} B_{kj}$,
and then taking $t$-derivatives:
$(AB)'_{ij} = \sum_k (A'_{ik}B_{kj} + A_{ik}B'_{kj})$,
and now the right-hand side is easily seen to be
$(A'B)_{ij} + (AB')_{ij}$,
thus establishing the requisite formula
$(AB)' = A'B + AB'$.
The rest is a simple induction on $k$, starting with
$(X^2)' = X'X + XX'$,
which itself follows from our formula for $(AB)'$. Making the inductive hypothesis that
$(X^k)' = X'X^{k-1} + XX'X^{k - 2} + . . . + X^{k - 1}X'$,
and noting that the Leibniz rule implies
$(X^{k + 1})' = X'X^k + X(X^k)'$,
then using the previous formula yields
$(X^{k + 1})' = X'X^k + XX'X^{k - 1} + X^2X'X^{k - 2} + . . . + X^kX'$,
the general term being of the form $X^lX'X^{k - l}$, $0 \le l \le k$. It is easily seen that, based on this induction, that the general form of the solution is
$(X^n)' = \sum_{l = 0}^{l = n - 1}X^lX'X^{n - l - 1}$,
which holds for $n \ge 2$. Since we can't assume $XX' = X'X$, that's as far as it goes. This general formula, incidentally, is quite widely used. I have spoken . . . er, I mean, written . . . that is to say, typed. With one finger, on my 'droid . . . ;)