I somehow deduced that $\tan x=\iota$ for any real value of $x$ by equating the value of $\tan(\frac{\pi}{2}+x)$ obtained using two identities. Let's assume that we're familiar with the identity : $\tan \Bigg (\dfrac{\pi}{2} + x \Bigg ) = -\cot x$ which we have derived using the unit circle.

I was trying to equate the values of $\tan \Bigg ( \dfrac{\pi}{2} + x \Bigg )$ obtained using the above mentioned identity and the compound angle identity and I got a weird result. Have a look :
$$\tan \Bigg ( \dfrac{\pi}{2} + x \Bigg ) = \dfrac{\tan\dfrac{\pi}{2} + \tan x}{1 - \tan \dfrac{\pi}{2} \tan x}$$
For the sake of simplicity, let us assume that $\tan \dfrac{\pi}{2} = a$ and $\tan x = b$.
$$ \therefore \tan \Bigg ( \dfrac{\pi}{2} + x \Bigg ) = \dfrac{a + b}{1 - ab} \implies -\cot x = \dfrac{a + b}{1 - ab}$$
Also,
$$-\cot x = \dfrac{-1}{\tan x} = \dfrac{-1}{b}$$
$$ {\color{red} {\therefore \dfrac{-1}{b} = \dfrac{a + b}{1 - ab} \implies -1 + ab = ab + b^2 \implies -1 = b^2}}$$
This leads us to :
$$\tan x = b = \sqrt{-1} = \iota$$
which is not true.
So, what went wrong here?

I think that the ${\color{red}{\text{highlighted part}}}$ was wrong because while cross-multiplying, I automatically made the assumption that $1 - ab$ has a real value which won't be the case if $\tan \Bigg ( \dfrac{\pi}{2} \Bigg )$ doesn't have a real value (which is actually the case as $\tan \Bigg ( \dfrac{\pi}{2} \Bigg ) = \dfrac{\sin \Bigg ( \dfrac{\pi}{2} \Bigg )}{\cos \Bigg ( \dfrac{\pi}{2} \Bigg )} = \dfrac{1}{0}$ which does not have a real value and approaches $\infty$)
Was this the mistake I made?
Thanks!

This is a cool "paradox," hadn't seen it before!
Even before the red line, the identity
$$\tan \Bigg ( \dfrac{\pi}{2} + x \Bigg ) = \dfrac{\tan\dfrac{\pi}{2} + \tan x}{1 - \tan \dfrac{\pi}{2} \tan x}$$
is objectionable.
This isn't true-- or, more accurately, it isn't even grammatically correct, since $\frac{\pi}{2}$ isn't in the domain of the tangent function.
Similarly, when you let $a = \tan\big(\frac{\pi}{2}\big)$ you are saying something grammatically incorrect, and so you can't expect to do formal algebraic manipulations with $a$ and receive something meaningful. It might be instructive to replace your identity with the identity
$$\tan \Bigg ( \dfrac{\pi}{2} + x \Bigg ) = \lim_{y \to \frac{\pi}{2}} \dfrac{\tan y + \tan x}{1 - \tan y \tan x}$$
(which is valid for any $x$ not an integer multiple of $\pi$), and see what happens.
