Considering your first question,
Hope you can continue from here....
For your second question, you have to use the product rule and the chain rule of differentiation. Please refer,
Product rule: Product rule - Wikipedia, the free encyclopedia
Chain rule: Chain rule - Wikipedia, the free encyclopedia
Hope this will help you.