You can also think of it like this:
Say we have , would you agree that
This is the same for , you can just think of the product as being of 3 parts, where two pieces are the same.
We can write it like this too if it helps;
EDIT : Just hit me you might be talking about the tan not distributing to the term on the right. And that is just due to the nature of the product rule.
Just focus on , where for this problem; and .
Just plug away and take derivatives where appropriate.