Part A
f(x) = tan(x)
f(g(x)) = tan( g(x) )
f(g(x)) = tan(x-2)
In short, the x has been replaced with x-2. This shifts the entire curve 2 spots to the right. See figure 1 below.
===========================================================
Part B
g(x) = x - 2
g(f(x)) = f(x) - 2
g(f(x)) = tan(x) - 2
The curve shifts down 2 units because we're basically computing y-2 for each y coordinate from f(x) = tan(x). Recall that y = f(x). See figure 2.