Take a look at the following
$$\eqalign{
& \,\,\,\,{{\tan \theta + \cos \theta } \over {\cos \theta \sin \theta }} - {1 \over {{{\cos }^2}\theta }} = {{{{\sin \theta } \over {\cos \theta }} + \cos \theta } \over {\cos \theta \sin \theta }} - {1 \over {{{\cos }^2}\theta }} \cr
& = {{\sin \theta + {{\cos }^2}\theta } \over {{{\cos }^2}\theta \sin \theta }} - {1 \over {{{\cos }^2}\theta }} \cr
& = {{\sin \theta + {{\cos }^2}\theta - \sin \theta } \over {{{\cos }^2}\theta \sin \theta }} \cr
& = {1 \over {\sin \theta }} \cr} $$