Term

class Term1(Scene):
    def construct(self):

        term = Term("x", "n")
        self.add(term)

        term.term.set_color(BLUE)
        term.superscript.set_color(RED)


Power Rule

class PowerRule(Scene):
    def construct(self):

        x = MathTex("x", color=BLUE)
        n = MathTex("n", color=GREEN)

        tex = MathTex(Term(x, n))
        self.add(tex).wait(1)

        tex.terms = [ n, Term(x, [ n, "-", 1 ]) ]
        self.play(TransformInStages.progress(tex))