The parent cosine function is:

The amplitude of the given function is 3, so the equation becomes:

The period of parent cosine function is 2π. In order to have a period of π, x will be multiplied by 2. So the function becomes:

There is no horizontal shift. There is a vertical shift of 2, so 2 will be added to the function value. Thus the final expression for the function becomes:
