$\frac{2 - gx + x^{2}}{1-x+x^{2}} \leqslant 3$
$2 - gx + x^{2} \leqslant 3 - 3x+ 3 x^{2}$
$2x^{2} + (g-3)x + 1 \geqslant 0$
$\text{For real roots, }$ $b^{2}-4ac \leqslant 0$
$(g-3)^{2}-4*2*1 \leqslant 0$
$g^{2}+9 - 6g - 8 \leqslant 0$
$g^{2} - 6g +1 \leqslant 0$
$g$ $lies$ $between $ $ 3 \pm 2\sqrt2$
No options are matching. really.
But if the question is $-x^{2}$ in the numerator , then g is coming in the range OPTION D