Calculate the inverse discrete-time Fourier transform of the target magnitude response. This will give you h_a[n]. Since you are asked to use a rectangular window with length 5, you only need to keep h_a[-2], h_a[-1], h_[0], h_a[1], and h_a[2] and assume the other components to be zero. Now, to have a linear-phase symmetric response, apply a time shift of (5-1)/2 to the above time domain components.