Answer
$y=3\sin \left(\frac{1}{2}x+\frac{\pi}{8}\right)-1$
Work Step by Step
The sine function is:
$$y=a\sin (bx-c)+d$$
Rewriting the equation:
$$y=a\sin b\left(x-\frac{c}{b}\right)+d$$
Finding $b$:
$$period=\frac{2\pi}{b}$$ $$b=\frac{2\pi}{period}=\frac{2\pi}{4\pi}=\frac{1}{2}$$
With right phase shift of $\frac{\pi}{4}$ or phase shift of $-\frac{\pi}{4}$:
$$\frac{c}{b}=-\frac{\pi}{4}$$ $$c=-\frac{\pi}{4}b=-\frac{\pi}{4}\left(\frac{1}{2}\right)=-\frac{\pi}{8}$$
Substituting $a=3,~b=\frac{1}{2},~c=-\frac{\pi}{8}$ and $d=-1$, the function is:
$$y=3\sin \left(\frac{1}{2}x-\left(-\frac{\pi}{8}\right)\right)+(-1)$$ $$y=3\sin \left(\frac{1}{2}x+\frac{\pi}{8}\right)-1$$