Let f(x), ang g(x), be two functions. Then if g(x)=f(x)+k, it means that g(x) is simply the function f(x) shifted up/down wards for k units.
g(x)=f(x+k), it means that g(x) is simply the function f(x) shifted horizontally for k units, either to the right or to the left, depending on the sign of the constant k.
g(x)=kf(x), it means that g is simply the function f, shrinked or extended(or how do you say it) vertically, depending whether |k|>1, or |k|<1.
g(x)=f(kx), is again the function f either extended, or shrinked horizontally, depending on the value of the constant k.
Remember that any change before the given function is applied (in this case 5cos(3x)) is a change in x and any function after the function is a change in y.
changing 5cos(3x) to cos(3x+6) involves 3 changes:
1) Add 6 to 3x. That is, change 3x to 3x+ 6= 3(x+2) or x to (x+ 2). That's the first transformation.
2) change y= cos(3x+6) to y= 5cos(3x+6) or y to 5y. That's the second transformation.