The definition of a derivative
#f'(x)=lim_(h->0)(f(x+h)-f(x))/h#
We want differentiate #f(x)=x^2sin(x)#, therefore we seek
#f'(x)=lim_(h->0)((x+h)^2sin(x+h)-x^2sin(x))/h#
Let's start by rewritten the numerator
#NUM=(x+h)^2sin(x+h)-x^2sin(x)#
#=(x^2+h^2+2xh)sin(x+h)-x^2sin(x)#
#=x^2sin(x+h)+h^2sin(x+h)+2xhsin(x+h)-x^2sin(x)#
#=color(blue)(x^2(sin(x+h)-sin(x)))+color(red)(h^2sin(x+h))+color(orange)(2xhsin(x+h))#
For simplicity let
#A=x^2(sin(x+h)-sin(x))#
#B=h^2sin(x+h)#
#C=2xhsin(x+h)#
In other words we seek
#f'(x)=lim_(h->0)(A+B+C)/h#
#=lim_(h->0)A/h+lim_(h->0)B/h+lim_(h->0)C/h#
#=L_A+L_B+L_C#
Now we just have to evaluate these limits
#L_A=lim_(h->0)(x^2(sin(x+h)-sin(x)))/h#
#=x^2lim_(h->0)(sin(x+h)-sin(x))/h#
#=x^2lim_(h->0)(sin(x)cos(h)+sin(h)cos(x)-sin(x))/h#
#=x^2lim_(h->0)(sin(x)(cos(h)-1)+sin(h)cos(x))/h#
#=x^2(lim_(h->0)(sin(x)(cos(h)-1))/h+lim_(h->0)(sin(h)cos(x))/h)#
#=x^2(sin(x)lim_(h->0)((cos(h)-1)/h)+cos(x)lim_(h->0)(sin(h)/h))#
#=x^2(sin(x)*0+cos(x)*1)#
#=x^2cos(x)#
#L_B=lim_(h->0)(h^2sin(x+h))/h#
#=lim_(h->0)hsin(x+h)#
#=0#
#L_C=lim_(h->0)(2xhsin(x+h))/h#
#=lim_(h->0)2xsin(x+h)#
#=2xsin(x)#
Combining these
#f'(x)=L_A+L_B+L_C=x^2cos(x)+2xsin(x)#