the trick here is to use some algebra to simplify your expression. before doing any calculus
Now you differentiate.
I am unsure about what "solve for T" means though.
Edit: I noticed you defined what "solve for T" means, I am sure you can finish the problem from here, post if you have any problems