We'll need to use the cosine transformation function f(x) = a•cos(bx+c)+d
Amplitude is 3, so a=3
Period is π, so 2π/b = π, which means b=2
Horizontal shift is 0, so -c/b = -c/2 = 0, which means c=0
Vertical shift is 4, so d=4
Final function is f(x) = 3cos(2x)+4