First, multiply each element of the first matrix by cosθ and the second matrix by sinθ and then use the matrix addition.
We have,
cosθ[cosθ−sinθsinθcosθ]+sinθ[sinθcosθ−cosθsinθ]
=[cos2θ−sinθcosθsinθcosθcos2θ]+[sin2θsinθcosθ−sinθcosθsin2θ]
=[cos2θ+sin2θ−sinθcosθ+sinθcosθsinθcosθ−sinθcosθcos2θ+sin2θ]
=[1001][∵sin2θ+cos2θ=1]
=I=unit matrix