The correct option is B [−π4,π4]
By definition of composition of function,
g(f (x)) =(sinx+cosx)2−1, is invertible (i.e. bijective)
⇒ g{f(x)} = sin 2x is bijective.
We know, sin x is bijective, only when xϵ[−π2, π2]
Thus, g{f(x)} is bijective, if - π2≤2x≤2x2
⇒ −π4≤x≤π4