Given, f: R → R and g: R → R
So, gof: R → R and fog: R → R
f(x) = x and \[g\left( x \right)\text{ }=\text{ }\left| x \right|\]
(gof) (x) = g (f (x))
= g (x)
= \[\left| x \right|\]
Now (fog) (x) = f (g (x))
= f (\[\left| x \right|\])
= \[\left| x \right|\]