We'll have to use the chain rule here. The chain rule, in plain English, says that the derivative of a compound function (like #tan(x^2)#, (which is the #x^2# function inside the #tan(x)# function - that's what makes it compound), is the derivative of the "inside" function multiplied by the derivative of the entire function. In mathspeak, we say the derivative of #f(g(x))=f'(g(x))*g'(x)#.
In our case, the "inside" function is #x^2#, and the derivative of #x^2# is, of course, #2x#. The entire function is #tan(x^2)#, and we know the derivative of #tan(x)# is #sec^2(x)#; so the derivative of #tan(x^2)# is #sec^2(x^2)#. Multiplying these two derivatives together gives #2xsec^2(x^2)#, which is our final result.