Graph:
The graph stretches forever to the left and right. This is a visual confirmation the domain is the set of any real number. We can replace x with any number to get some output y = f(x).
The graph stretches forever up and down, which gives visual confirmation of the range being the set of all real numbers.
If your teacher wants interval notation, then,
Domain is (−∞, ∞)
Range is (−∞, ∞)
Both result in the same interval notation.
If instead inequalities are required, then,
Domain: −∞ < x < ∞
Range: −∞ < y < ∞