This question makes good use of the trigonometric identities tan2x + 1 = sec2x and 1 + cot2x = cosec2x which can be easily recited in the exam by using the identity sin2x + cos2x = 1 and then dividing by cos2x or sin2x respectively!
Remember, the trick when it comes to solving problems such as these is just perseverance and using trial and error. Practice makes perfect!
There are many ways of solving this problem, here is one method:
4cosec2x - cot2x = k
4(1 + cot2x) - cot2x = k
4 + 3cot2x = k
3cot2x = k - 4
tan2x = 3 / (k - 4)
sec2x - 1 = 3 / (k - 4)
sec x = ( (3 / (k-4)) + 1 )1/2