$f:R^{2}\rightarrow R^{2}$ where $f(x,y)=(2x+y,x+y)$. 

So I know that the function is one to one and onto and don't need help proving that. But with its inverse, I am a little confused. My professor said the inverse is $g(x,y)=(x-y,2x-y)$, and I want to know how he knew that. He doesn't really explain how got the inverse, just states what the inverse is. So, how do you know what the inverse is? Is there some way to solve for it?