I need help with this practice problem I’m having trouble solving it

A generic cosecant function is
[tex]f(x)=A\csc (kx+\theta)+C[/tex]We must find A, k, θ, and C using the information that we have.
Finding A:
To find A we can use the range of the function, we know there is a gap between -9 and 5, that's the crucial information, the value of A will be the mean of |-9| and |5| (in modulus!), therefore
[tex]A=\frac{|-9|+|5|}{2}=\frac{9+5}{2}=\frac{14}{2}=7[/tex]Therefore
[tex]f(x)=7\csc (kx+\theta)+C[/tex]Finding C:
We can use the fact that we know A and find C, let's suppose that
[tex]\csc (kx+\theta)=1[/tex]For an unknown value of x, it doesn't matter, using the range again we can use the fact that 5 is a local minimum of the function, therefore, when the csc(kx + θ) is equal to 1 we have that the function is equal to 5
[tex]\begin{gathered} 5=7\cdot1+C \\ \\ C=-2 \end{gathered}[/tex]And we find that C = -2. Tip: You can also suppose that it's -1 and use -9 = 7 + C, the result will be the same.
Finding k:
Now we will use the asymptotes, we have two consecutive asymptotes at x = 0 and x = 2π, it means that the sin(kx) is zero at x = 0 and the next zero is at x = 2π, we know that sin(x) is zero every time it's a multiple of π, which gives us
[tex]\begin{gathered} \sin (0)=0\Rightarrow\sin (k\cdot0)=0\text{ (first zero | first asymptote)} \\ \sin (\pi)=0\Rightarrow\sin (2k\pi)=0\Rightarrow k=\frac{1}{2}\text{ (second zero | second asymptote)} \end{gathered}[/tex]Therefore, k = 1/2
[tex]f(x)=7\csc (\frac{x}{2}+\theta)-2[/tex]Finding θ:
It's the easiest one, since we have a zero at x = 0 it implies that θ = 0
Therefore our function is
[tex]f(x)=7\csc (\frac{x}{2})-2[/tex]Final answer:
[tex]f(x)=7\csc \mleft(\frac{x}{2}\mright)-2[/tex]