This function contains both a product and a quotient. Since the quotient is "outside" the product (that is, we would find the quotient after finding the product x2sin x), we start with the quotient rule.
Now we need to use the product rule, in order to find one of the derivatives we need to finish applying the quotient rule!
(x2sin x)' = 2xsin x + x2cos x.
Then we can go back and finish with the quotient rule: