Answer
a) $(-\infty, -1) \cup (4, \infty)$
b) $[-1,4]$
Work Step by Step
Because the x-axis is basically $g(x)=0$, hence the values on or above the x axis are such that $g(x)\ge 0$, and the value below the x-axis are such that $g(x)\lt0.$
a) All the x-values such that the graph is above the x-axis, hence $x$ is in the interval: $(-\infty, -1) \cup (4, \infty)$
b) All the x-values such that the graph is below or on the x-axis, hence $x$ is in the interval: $[-1,4].$