A cos wave has its first maximum at the point (pie/2, 2) and its first minimum at (5pie/2, -4) what is the equation of the function?

I remember writing 3cos(1/2(x-pie/2)-1 but I'm sure that it's wrong ?

Looks good to me.