Solution (By Examveda Team)
$$\eqalign{
& \left( {\frac{{\tan \theta - \sec \theta + 1}}{{\tan \theta + \sec \theta - 1}}} \right)\sec \theta = \frac{1}{k} \cr
& \left( {\frac{{\tan \theta - \sec \theta + 1}}{{\frac{1}{{\sec \theta - \tan \theta }} - 1}}} \right)\sec \theta = \frac{1}{k} \cr
& \frac{1}{k} = \left( {\frac{{\tan \theta - \sec \theta + 1}}{{1 - \sec \theta + \tan \theta }}} \right)\left( {\sec \theta - \tan \theta } \right)\sec \theta \cr
& \frac{1}{k} = {\sec ^2}\theta - \tan \theta \sec \theta \cr
& \frac{1}{k} = \frac{1}{{{{\cos }^2}\theta }} - \frac{{\sin \theta }}{{{{\cos }^2}\theta }} \cr
& k = \frac{{{{\cos }^2}\theta }}{{\left( {1 - \sin \theta } \right)}}\frac{{\left( {1 + \sin \theta } \right)}}{{\left( {1 + \sin \theta } \right)}} \cr
& k = \frac{{{{\cos }^2}\theta \left( {1 + \sin \theta } \right)}}{{{{\cos }^2}\theta }} \cr
& k = 1 + \sin \theta \cr} $$
Join The Discussion