So. Allow me to justify what i just did.
First line: by definition, tangent in sine/cosine, and cotangent is the reciprocal of that.
Second line: You have to multiply by (

) to get a common denominator, so you get the second line.
Third line: Canceling stuff out. to get that.
Fourth line: Adding them together since they now have common denominators.
Fifth line: By terms of the pythagorean identity,

+

=1. so that is equal to the right side.
Thus verified.