We know that,
#tan3theta=(3tantheta-tan^3theta)/(1-3tan^2theta)#.
#:. cot3theta=1/(tan3theta)=(1-3tan^2theta)/(3tantheta-tan^3theta)#
#:.cot((3A)/2)={1-3tan^2(A/2)}/{3tan(A/2)-tan^3(A/2)}#.
Letting #tan(A/2)=t,# we have,
#cot(A/2)-3cot((3A)/2)#,
#=1/t-3{(1-3t^2)/(3t-t^3)}#,
#1/t-{3(1-3t^2)}/{t(3-t^2)}#,
#={(3-t^2)-3(1-3t^2)}/{t(3-t^2)}#,
#=(8t^cancel(2))/{cancel(t)(3-t^2)}#,
#=(8t)/{(1+t^2)+2(1-t^2)}#
#={4*(2t)/(1+t^2)}/{(1+t^2)/(1+t^2)+2*(1-t^2)/(1+t^2)}#.
Note that, #(2t)/(1+t^2)={2tan(A/2)}/(1+tan^2(A/2))=sinA, and#
#(1-t^2)/(1+t^2)=cosA#.
#rArrcot(A/2)-3cot((3A)/2)=(4sinA)/(1+2cosA)," as desired!"#