Example  1.   $ f(x) = 2x - 1; g(x) = 3x + 2$.

$(f \circ g)(x) = f(g(x)) =f(3x+2) = 2*(3x+2) - 1 = (6x +4) -1= 6x + 3$
Graph of $f \circ g$ with SAGE:
Mapping Diagram of $f \circ g$ with SAGE: