Once you see the answer, it’s not really hard, doesn’t involve any very complex math, you just need a bit of creativity. I don’t think just any high school student would come up with it, but some could.

I had never realized this but now that I think about the above two identities it sounds like these two identities can be generalized for any n, so that we have product of n trig functions on the left and a trig function of na on the right. (in the above identity we have n=3) I will post the identity and a neat proof of that if there is any interest.

I posted the identities and proof of one of them here. The other one can be proved similarly.

Edit: oops. The second identity doesn’t seem to be correct for all n’s. If you replace a by a+pi/2 in the first identity on the left you get product of cosines but on the right you get sin(na+npi/2) which is not always equal to cos(na).