Example 3.
$ f(x) = x + 2; g(x) = 3x$
.
$(f \circ g)(x) = f(g(x)) =f(3x) = 3x+2$
Select the point $x$ in the mapping diagram to move the point by mouse or use the scroll up or down key to move by increments.