f(x) = If[x < 2, x^(2) - 1, x + 1]
g(x) = If[x < 2, x^(2) - 1, (4 * x) - 5]