We have two function
[tex]f(x)=3x[/tex]and
[tex]g(x)=x+1[/tex]We need to find the composition of these function, i.e.
[tex](g\circ f)(x)[/tex]Now, notice the following diagram
then, we have defined the composition via our diagram, i.e.
[tex](g\circ f)(x)=g(f(x))[/tex]We need to find first the image of x via f, and then to this image f(x), find the image via g, as follows