So, one question i'm stuck in is "Find a formula for the graph of the functiony=f(x) given in the figure above." (below)

For the formula f(t) = Acos(B(t+h))+C, I figured the following out:

amplitude = 3

period = 2π (2π/B=2π, B=1)

h (horizontal shift) = π

C (vertical shift) = 4

and replaced into the formula to get:

f(t) = 3cos(1(t+π))+4

Now when I graph that on my calculator, it looks fine, but it's not the correct answer. Where did I mess up? Am I even supposed to be using cos? The only reason I did is because it seemed like calculating h (the horizontal shift) would be easier for cos than sin, but I don't see why it shouldn't work either way.

Any help is greatly appreciated.