cos²A - sin²A = cos2A, this is a general indentity where A can have any random value x/2, y/3, 1/8, 8, 9 etc.
Replacing A with 5x:
=> cos²(5x) - sin²(5x) = cos²(10x)
Moreover,
cos(A + B) = cosAcosB - sinAsinB.
When A = B,
cos(A + A) = cosAcosA - sinAsinA
cos2A = cos²A - sin²A
You can do the same with 5x.
cos(10x) = cos(5x + 5x)
cos(10x) = cos(5x)cos(5x) - sin(5x)sin(5x)
cos(10x) = cos²(5x) - sin²(5x)