Help on composition of functions

I know how to compose normal functions but never seen this type of task any help?

Find the composition $$g \circ f$$ of the following functions $$f, g : \Bbb{R} \to \Bbb{R}$$ given by the formulas: \begin{align*} f(x) &= \begin{cases} x^2 + 1 & \text{if } x \in (-\infty, 0) \\ x - 2 & \text{if } x \in [0, +\infty) \end{cases} \\ g(x) &= \begin{cases} x + 2 & \text{if } x \in (-\infty, 2) \\ 1 - 2x^2 & \text{if } x \in [2, +\infty) \end{cases}. \end{align*}

• You should provide a picture with better quality or rewrite a problem, also show what you have already tried. – whiskeyo Feb 6 at 20:42
• Redefine your functions on 3 intervals :$(-\infty,0)$, $(0,2)$, $(2,\infty)$ and compose your functions over these intervals. – Bernard Massé Feb 6 at 20:42
• link italic bold code this my attempt and task – Bagan Przemek Feb 6 at 20:44

To calculate $$g\bigl(f(x)\bigr)$$, you have to determine when $$f(x)<2$$ and when $$f(x)\ge 2$$. Consider separately the cases $$x<0$$ and $$x\ge 0$$.