First, since the moon is in first quarter we know that the earth-moon-sun geometry looks like that in part (a) in the figure below. Part (b) shows where an observer would be if the local time is 3 AM. Part (c) shows the combination of these facts and includes the observer's horizon plane. Based on the last diagram, you should be able to answer the detective's question.
Part (c) shows that the first quarter moon is definitely not visible at 3 AM (in fact, it sets at midnight). Without the light from the moon or artificial light sources it was too dark for the witness to identify anyone. So, with a sound understanding of the geometry of the earth-moon system our detective knows that the witness can't be telling the truth.