When writing cos(x) is is important to include the x and not just write cos. Assuming you meant the former, we shall prove that
if y = sin(x)sin(x) - cos(x)cos(x)
then dy/dt = 2sin(2x).
Since the sinus in the derivative has 2x as an argument, rather than just x, this is a sign that we have to use a "double angle formula". Either looking in a table, or remembering, we find that
cos(2x) = cos^2(x) - sin^2(x).
Knowing this, we can rewrite y as
y = sin^2(x) - cos^2(x)
y = -(cos^2(x) - sin^2(x))
y = -cos(2x).
Now, taking g(x) = 2x as an inner function and y(g(x)) = -cos(g(x)) as an outer function, we get from the Chain rule that
dy/dx = (dy)/(dg) *(dg)/(dx)
dy/dx= -(-sin(g(x))) *2
dy/dx = 2sin(2x),
since d/(dg) cos (g) = -sin(g) and d/(dx) 2x = 2. Thereby you have showed what you sought out to show.
Note: You could also solve the problem by taking the derivative of y with respect to x, and only later use a double angle formula. Here, as you probably noticed, we first used a double angle formula and then took the derivative.