The straightforward answer is to express cotangent and tangent in terms of sines and cosines, add the fractions, then simplify. But that is boring, so here is a geometric proof that I whipped up (sorry for crude Paint diagram).
Label the point where the two right angles are marked as E, I forgot to add that label. If we construct two right triangles with a common side BE of length 1 and having angle theta in the marked locations, we see that the side AE is of length tan(theta), and CE is of length cot(theta). The area of triangle ABC is 1/2 is base times its altitude. The altitude BE is length 1, and the base AC is of length tan(theta) + cot(theta) as we just found. Now angle ABC is itself a right angle, so triangle ABC makes up half of the rectangle ABCD. Thus ABCD's area is twice the area of ABC, so it is tan(theta) + cot(theta). On the other hand, the side lengths of ABCD are sec(theta) and csc(theta), so we have that tan(theta) + cot(theta) = sec(theta) csc(theta).