Write a cosine function that has an amplitude of 5, a midline of y=2 and a period of 3π. f(x)=

wrong again.

Since cos(kx) has period 2π/k, we want
2π/k = 3π
k = 2/3
so y = 5cos(2/3 x) + 2

no horizontal shift was specified.

Apologies for the mistake. You are correct. The correct cosine function would be:

f(x) = 5cos(2/3x) + 2

f(x) = 5cos(2x - π) + 2