The domain of a function is the set of valid x-values a function can take so in your example, h(x)=x^2+2 ,it can take all real values of x. As for g(x)=sqrt(x)-1, there is restriction on the values of x it can take. We know that the values under a square roots is always greater or equals 0. Hence, the domain is all x, for x>=0. Range is then the 'output' of the function. Sketch the graph and take note of the minimum and maximum value of the graph.