Explanation:
the domain is the set or interval of all valid x-values.
the range is the set of interval of all valid y-values.
the function is a line function, so it's values will continuously increase with increasing x-valies.
therefore we can simply take the 2 interval ends of the domain as the x-values that create the lowest and the highest functions value in that interval.
the function does not make any large twists and turns in that interval.
y = 3x + 1
for x = 2
y = 3×2 + 1 = 6 + 1 = 7
for x = 8
y = 3×8 + 1 = 24 + 1 = 25
so, the range is [7, 25]