Doubt from theory of functions

bro we can say it will be non periodic given the condition that g(x) is invertible …
@Hritik

Why g(x) needs to be invertible?

to prove by contradiction
as in such cases we either use contradiction or examples

and here examples wont do