You can prove it using the formula for the sine and cosine of a sum.
Recall that
#sin(a+b)=sin a cos b+cos a sin b# (sine of a sum).
#cos(a+b)=cos a cos b-sin a sin b# (cosine of a sum).
First put in #a=x, b=x#, then
#sin(2x)=sin(x+x)=sin x cos x+ cos x sin x=2 sin x cos x# (double angle identity for sine).
#cos(2x)=cos(x+x)=cos^2 x- sin^2 x# (double angle identity for cosine).
Now, repeat but this time set #a=2x, b=x#. Use the double angle identities we obtained above for #sin 2x# and #cos 2x#. So
#sin(3x)=sin(2x+x)=(2 sin x cos x)cos x+(cos^2 x-sin^2 x)sin x=3 sin x cos^2 x-sin^3 x# (triple angle identity for sine).
And the identity ee originally set out to prove:
#cos(3x)=cos(2x+x)=(cos^2 x-sin^2 x)cos x-(2 sin x cos x)sin x=cos^3 x-3 sin^2 x cos x# (triple angle identity for cosine).