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 dydt=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)=cos2(x)−sin2(x).
Knowing this, we can rewrite y as
y=sin2(x)−cos2(x)
y=−(cos2(x)−sin2(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
dydx=dydg⋅dgdx
dydx=−(−sin(g(x)))⋅2
dydx=2sin(2x),
since ddgcos(g)=−sin(g) and ddx2x=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.