The chain rule states that given the functions #y(u(x))# and #u(x)#, #d/dx[y]=d/(du)ytimesd/dxu#. Let's apply this to our problem.
First use the constant rule (#d/dx[au]=atimesd/dxu#) to simplify the problem.
#d/dx[5cos^2x]=5d/dx[cos^2x]#
Now it's time for the chain rule. Let #u=cosx# and let #y=u^2#.
#5d/dx[cos^2x]=5d/dx[u^2]=5d/dx[y]#
By the chain rule,
#d/dx[y]=d/(du)ytimesd/dxu=d/(du)u^2timesd/dxcosx#
Solving these derivatives,
#d/(du)u^2timesd/dxcosx=2utimes(-sinx)=-2usinx=-2cosxsinx#
So since #d/dx[y]=-2cosxsinx#, #5d/dx[y]=5(-2cosxsinx)=-10cosxsinx#
#d/dx[5cos^2x]=-10cosxsinx#