A graph is given and it is required that you find the domain of the graphed function.
Recall that the domain of a relation or a function is the set of all possible values for input in that function.
Note that the set of possible values for input is the set of x-values of the function.
Hence, to find the domain from the graph, check the interval of x-values from the given graph.
Notice from the graph that the x-values start at x=-4 to x=2 (both inclusive).
It follows that the domain of the function is:

The correct option is D.