This relationship is not true.
[tex]1 + \sec^2(x) = 1 + (1 - \tan^2(x)) = 2 - \tan^2(x)[/tex]
and
[tex]\cot^2(x) = \dfrac1{\tan^2(x)}[/tex]
Rewrite the equation in terms of only tangent.
[tex]2 - \tan^2(x) = \dfrac1{\tan^2(x)} \iff \tan^4(x) - 2\tan^2(x) + 1 = 0[/tex]
Factorize the left side.
[tex]\left(\tan^2(x) - 1\right)^2 = 0[/tex]
Solve for [tex]\tan(x)[/tex].
[tex]\tan^2(x) - 1 = 0[/tex]
[tex]\tan^2(x) = 1[/tex]
[tex]\tan(x) = \pm 1[/tex]
[tex]x = \pm\tan^{-1}(1) + n\pi = \pm\dfrac\pi4 + n\pi[/tex]
where [tex]n[/tex] is an integer. That is, the equation only holds for certain values of [tex]x[/tex], as opposed to all [tex]x[/tex], so it's not an identity.