You want to calculate (f(x+h)-f(x))/h and then take the limit as h→0. So f(x+h)=cos(x+h)=cos(h)cos(x)-sin(h)sin(x).
so f(x+h-f(x)= cos(x+h)=cos(h)cos(x)-sin(h)sin(x)-cos(x). Now factor out cos(x), cos(x)(cos(h)-1)-sin(h)sin(x)
This is the numerator so we have to divide this by h
(cos(x)(cos(h)-1)-sin(h)sin(x))/h now when you let h go to 0 whats left is -sin(h)sin(x)/h whose limit is -sin(x)
lim h→0 of sin(h)/h=1
Let me know if you have questions
Jim