To obtain a vertical shift, add the right side of the equation by the given shift. This means f(x) will become f(x)+a where a is the vertical shift. Thus, f(x) with a vertical shift of -5 is as follows:
To obtain a horizontal shift, change x to x-b, where b is the horizontal shift. Thus, a graph with a horizontal shift of -1 is as follows: