How to find domain and range of a graph