How do you find the domain and range of  f(x) = 3x + 1 ?

The domain of a function is all possible values it can take on for $x$, a simple polynomial like $f \left(x\right) = 3 x + 1$ can take on all real numbers so it's domain is $\mathbb{R}$, so this means there is no real number which makes this function undefined.
Similarly the range is also $\mathbb{R}$, because the $y$ value of the function can take on all real values, this can be seen from the graph as the line infinitly spans the $y$ axis.