Why is $\sec^2 (\tan^{-1} (\frac{x}{2})) = 1 + \tan^2 (\tan^{-1} (\frac{x}{2}))$ and not $(1 + \tan^2 )(\tan^{-1} (\frac{x}{2}))$? 
Why is $\sec^2 (\tan^{-1} (\frac{x}{2})) = 1 + \tan^2 (\tan^{-1} (\frac{x}{2}))$ and not $(1 + \tan^2 )(\tan^{-1} (\frac{x}{2}))$?

If you replace $\sec^2$ with $\tan^2 + 1$, it should be $(1 + \tan^2 )(\tan^{-1} (\frac{x}{2}))$, right?
However, it seems that it is not multiplication here : $\sec^2 (\tan^{-1} (\frac{x}{2}))$, when the $1$ becomes independent of the $\tan^2$ somehow.
Could someone explain why?

The identity
$$\sec^2\theta\equiv1+\tan^2\theta$$
holds for all values of $\theta$, not just some values- that's why it's an identity, as opposed to an equation. Replacing $\theta$ by $\tan^{-1}(\frac{x}{2})$ yields the correct identity:
$$\sec^2(\tan^{-1}(\frac{x}{2}))\equiv1+\tan^2(\tan^{-1}(\frac{x}{2}))\equiv1+\left(\tan(\tan^{-1}(\frac{x}{2}))\right)^2\equiv1+\frac{x^2}{4}$$
Edit
Thinking that $\sec^2\theta$ means $\sec^2\times\theta$ is meaningless- $\sec^2$ or indeed any other trigonometrical function has no meaning unless it has an argument, ie the value the that is an input into the trigonometical function (in your case $\tan^{-1}\frac{x}{2}$).
