Given $$\int_0^\infty f(x)\sin (kx)dx=\cases {3, \quad 0\le k \le 5 \\ 6, \quad 5 \le k\le 7 \\ 0, \quad k\ge7} $$
So, this is to be solved using the Fourier Transform approach.
I tried to use this technique,
If $$f(z)=\int_0^\infty(a(x)\cos (xz)+b(x)\sin (xz)) dx$$ then,
$$\implies a(x)=\frac{1}{\pi}\int_{-\infty}^{\infty}f(z)\cos (xz)dz\\ \implies b(x)=\frac{1}{\pi}\int_{-\infty}^{\infty}f(z)\sin (xz)dz$$
Based on this, I know that $b(x)$ function is the above $3$ case statements, but to determine $f(x)$, I need the value of $a(x)$ as well. How should I proceed from here using Fourier's method only? Or does there exist any other approach to solve it?
You have
$$\int_0^\infty f(x)\sin (kx)dx=F_s(k)=\cases {3, \quad 0\le k \le 5 \\ 6, \quad 5 \le k\le 7 \\ 0, \quad k\ge7} $$ that is, $F_s(k)$ is the Fourier sine transform of $f(x)$ (see for example Fourier cosine and sine transform).
Thus, to calculate $f(x)$ you must obtain the inverse Fourier sine transform of $F_s(k)$:
$$f(x)=\frac{2}{\pi}\int_0^\infty F_s(k)\sin (kx)dk=\frac{2}{\pi}\left(\int_0^53\sin (kx)dk+\int_5^7 6\sin (kx)dk\right)$$
and after simplifly
$$f(x)=\frac{2}{\pi}\,\,\frac{3 (1+\cos (5 x)-2 \cos (7 x))}{x}$$