Well, all you need to know is the transformations. If you have:
\[f(ax)\]
Make shortens the function in the x-direction by a factor of a.
Ex. cos(x) has period 2pi, cos(2x) has period pi (which is why the above problem comes out how it does)
http://www.wolframalpha.com/input/?i=plot+y%3Dcos(x)%2Cy%3Dcos(2x)
If you have:
\[af(x)\]
Then that increases the height of the function by a factor of a. So for trig functions (sine and cosine at least) this changes the amplitude. For example: cos(x) has an AMPLITUDE of 1 because it only goes from -1 to 1 (in physics amplitudes are generally from the zero point to a peak or trough) but 2cos(x) has amplitude 2 because it stretches it vertically by 2.
http://www.wolframalpha.com/input/?i=plot+y%3Dcos(x)%2Cy%3D2cos(x)
If you have:
\[f(x+a)\]
Then it shifts the function to the LEFT by a (assuming a positive) if a is negative then its shifts it to the RIGHT (yes, its backwards for this one) For example: cos(x) starts at (0,1) (looking at x=0), but cos(x+pi) (as we just saw) starts at (0,-1) because it shifts by pi (moving a peak to a trough)
http://www.wolframalpha.com/input/?i=plot+y%3Dcos(x)%2Cy%3Dcos(x%2Bpi)
If you have:
\[f(x)+a\]
If a is positive it shifts the function UP by a, and if its negative down by a. For example cos(x) has a y intercept of (0,1) but cos(x)+2 has a y intercept at (0,3)
http://www.wolframalpha.com/input/?i=plot+y%3Dcos%28x%29%2Cy%3Dcos%28x%29%2B2
If you have:
\[-f(x)\]
It rotates the function around the x axis. For example, 2cos(x) has a y-intercept of (0,2) but -2cos(x) has a y-intercept of (0,-2)
http://www.wolframalpha.com/input/?i=plot+y%3D2cos%28x%29%2Cy%3D-2cos%28x%29
And finally, if you have:
\[f(-x)\]
Then it rotates it around the y-axis. For example, if you have sin(x) at x=-pi/2 you have (-pi/2,-1) and it INCREASES through the origin, but sin(-x) makes it do the exact opposite (just see link)
http://www.wolframalpha.com/input/?i=plot+y%3Dsin%28x%29%2Cy%3Dsin%28-x%29
Those are all the transformations (there are rotations and things too but thats different.