We have, g(x)=x2+x−2
and 21(gof)x=2x2−5x+2 ⇒21(gf(x))=2x2−5x−2 ⇒g(f(x))=4x2−10x+4…(i)
and g(f(x))=(f(x))2+f(x)−2…(ii)
Eqs. (i) and (ii) are equal ∴(f(x))2+f(x)−2 =4x2−10x+4 ⇒(f(x))2+f(x)=4x2−10x+6 ⇒{f(x)}2+f(x)+41 =4x2−10x+6+41 ⇒(f(x)+21)2=4x2−10x+425 ⇒(f(x)+21)2=(2x−25)2 ⇒f(x)+21=2x−25 ⇒f(x)=2x−3