The question is: f(x)=(1+2x)/(1+x), find the inverse and state the domain

I have made it up to
y=(1+2x)/(1+x)
x=(1+2y)/(1+y)

wow, didn't get far, eh? Just start solving for y:

x = (1+2y)/(1+y)
x(1+y) = 1+2y
x + xy = 1 + 2y
x-1 = 2y - xy
x-1 = y(2-x)
(x-1)/(2-x) = y

Easy, no?

The domain of f(x) is all real numbers except where the denominator is zero. That is all values except -1.

The domain of the inverse is all values except x = 2