Given that f: R+ → R+ and g: R+ → R+
Therefore, fog: R+ → R+ and gof: R+ → R+
Domains of fog and gof are the same.
Let us find fog and gof also we have to check whether they are equal or not,
Consider that (fog)(x) = f(g(x))
= f(√x)
= √x2
= x
Now consider that (gof)(x) = g(f(x))
= g(x2)
= √x2
= x
Therefore, (fog)(x) = (gof)(x), ∀ x ∈ R+
Hence, fog = gof