I want to differentiate this $\displaystyle 2e^{2x}(Acos(x)-Bsin(x))+e^{2x}(-Asin(x)+Bcos(x))$

I have put the a terms together to make it simpler am i right in doing so?

$\displaystyle Ae^{2x}(2cos(x) - sin(x)))+ Be^{2x}(2sin(x) + cos(x))$

I need to differentiate this when I try it got really messy and could not complete it.