-7
step-by-step explanation:
x^2 + 18x + 74 = (x + 9)^2 - 81 + 74
= (x + 9)^2 - 7.
so q = -7.
38 was the other number of your question.