f(x) = If[x < -2, (2 * x) + 1, (-x^(2)) + 3]
g(x) = If[x < 1, (-x) - 2, If[1 ≤ x < 4, sqrt(x^(2) + 3), (-x^(3)) - (2 * x^(2)) + 7]]